浏览代码

fixed lines according to https://github.com/inuyaksa/jquery.nicescroll/issues/588

Alexander 8 年之前
父节点
当前提交
f92e753240
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      jquery.nicescroll.js

+ 3 - 2
jquery.nicescroll.js

@@ -1976,8 +1976,9 @@
               if (mut.type=="attributes") {
                 return ($("body").hasClass("modal-open") && $("body").hasClass("modal-dialog") && !$.contains($('.modal-dialog')[0],self.doc[0])) ? self.hide() : self.show();  // Support for Bootstrap modal; Added check if the nice scroll element is inside a modal
               }
-            });  
-            if (document.body.scrollHeight!=self.page.maxh) return self.lazyResize(30);
+            });
+            // if (document.body.scrollHeight!=self.page.maxh) return self.lazyResize(30);
+            if (self.me.clientWidth!=self.page.width || self.me.clientHeight!=self.page.height) return self.lazyResize(30);
           });
           self.observerbody.observe(document.body, {
             childList: true,