I am working on a site using Bootstrap 3.1.0.
You\'ll notice when the modal window opens, the browser scroll bar just disappears for a split second, then comes back.
For Bootstrap-4.3.x use the following css:
.modal-open {
padding-right: 0 !important;
}
/* if you have .navbar in your page then add padding-right for your .navbar (default is 16px) */
.modal-open .navbar {
padding-right: 16px !important;
}
That's it. Nothing else is needed like: JavaScript code to add some .class
in your body
and then adding CSS codes to style them.