From 074d183158c659aa1b4555d021e3b8811347abe7 Mon Sep 17 00:00:00 2001 From: Denny Lim Date: Thu, 8 May 2014 11:51:18 +0900 Subject: [PATCH] Update visibility.js refactorying from "_getStyle(p, 'overflow')" to "overflow" and added "'auto' === overflow" because the value of overflow can be auto same as scroll. --- visibility.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/visibility.js b/visibility.js index 95244a8..ace5e16 100644 --- a/visibility.js +++ b/visibility.js @@ -65,7 +65,8 @@ Element.prototype.isVisible = function() { //-- If we have a parent, let's continue: if ( p ) { //-- Check if the parent can hide its children. - if ( ('hidden' === _getStyle(p, 'overflow') || 'scroll' === _getStyle(p, 'overflow')) ) { + var overflow = _getStyle(p, 'overflow'); + if ( ('hidden' === overflow || 'scroll' === overflow || 'auto' === overflow) ) { //-- Only check if the offset is different for the parent if ( //-- If the target element is to the right of the parent elm