Browse Source

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

Alexander 8 years ago
parent
commit
f92e753240
1 changed files with 3 additions and 2 deletions
  1. 3 2
      jquery.nicescroll.js

+ 3 - 2
jquery.nicescroll.js

@@ -1976,8 +1976,9 @@
               if (mut.type=="attributes") {
               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
                 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, {
           self.observerbody.observe(document.body, {
             childList: true,
             childList: true,