Browse Source

Merge pull request #544 from abhi05b/patch-1

Fixing nicescroll visibility inside Modal
Inuyaksa 9 years ago
parent
commit
e187fb6e73
1 changed files with 1 additions and 1 deletions
  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);