浏览代码

Merge pull request #544 from abhi05b/patch-1

Fixing nicescroll visibility inside Modal
Inuyaksa 9 年之前
父节点
当前提交
e187fb6e73
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      jquery.nicescroll.js

+ 1 - 1
jquery.nicescroll.js

@@ -1896,7 +1896,7 @@
           self.observerbody = new ClsMutationObserver(function(mutations) {
             mutations.forEach(function(mut){
               if (mut.type=="attributes") {
-                return ($("body").hasClass("modal-open")) ? self.hide() : self.show();  // Support for Bootstrap modal
+                return ($("body").hasClass("modal-open") && !$.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);