浏览代码

Consider elements with class `hidden` as invisible

JC Brand 7 年之前
父节点
当前提交
4d34952eae
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/utils.js

+ 3 - 0
src/utils.js

@@ -655,6 +655,9 @@
     }
     }
 
 
     u.isVisible = function (el) {
     u.isVisible = function (el) {
+        if (u.hasClass('hidden', el)) {
+            return false;
+        }
         // XXX: Taken from jQuery's "visible" implementation
         // XXX: Taken from jQuery's "visible" implementation
         return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0;
         return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0;
     };
     };