Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap modal automatically closing on scroll

I am using a niceScroll plugin in Bootstrap Modal. The plugin seems to work fine in everywhere except in Modal on IE. The issue is, on click and drag of the vertical Scroll Bar to scroll down when I release the vertical scrollbar the modal is automatically closing. I tried event.stopPropagation() but it did not work.

Please someone provide some input how to handle this behavior of modal scrolling issue.

angular.element('#contentDiv').niceScroll();
angular.element('#contentDiv').getNiceScroll().resize();


<div  id="sampleBubblediv"  ng-init="loadData()">
  <div id="contentDiv"></div>
</div>
like image 975
Md Shoaib Alam Avatar asked Apr 13 '26 11:04

Md Shoaib Alam


1 Answers

Now that you have narrowed down to IE passing clicks on the scroll bar as body clicks, you need to search for that. Here is a work around for the issue.

Determine whether user clicking scrollbar or content (onclick for native scroll bar)

like image 90
whiteatom Avatar answered Apr 15 '26 23:04

whiteatom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!