Why does body not scroll when modal is opened?

Why does body not scroll when modal is opened?

Whenever I click the modal, the scroll bar won’t disappear and the header will move to right a bit. Then I tried to add .modal-open {overflow:auto;} (which most people recommended). It indeed fixed the issues: the scroll bar appears after I open the modal.

When do you use bootstrap modal with skrollr?

When using Bootstrap modal with skrollr, the modal will become not scrollable. Problem fixed with stop the touch event from propagating. Actually for Bootstrap 3 you also need to override the .modal-open class on body. Bootstrap adds the class .modal-open to the body when a modal is opened.

Why does scrolling get disabled in jQuery Stack Overflow?

I have a modal and within that modal, there is a dropdown that displays large hidden content, which is working. Now when you open the next modal, stacked on top of the first modal and dismiss it, the scrolling on modal underneath becomes disabled.

When to remove Modal open from CSS body?

Answers: Bootstrap’s modal automatically adds the class modal-open to the body when a modal dialog is shown and removes it when the dialog is hidden. You can therefore add the following to your CSS: body.modal-open { overflow: hidden; }

Is the scroll event cancelable in Mozilla browser?

The scroll event is not cancelable. However it is possible to cancel the mousewheel and wheel events. The big caveat is that not all legacy browsers support them, Mozilla only recently adding support for the latter in Gecko 17.0. I don’t know the full spread, but IE6+ and Chrome do support them.

Can You disable scroll event in Bootstrap v3.0.x?

Warning: The option below is not relevant to Bootstrap v3.0.x, as scrolling in those versions has been explicitly confined to the modal itself. If you disable wheel events you may inadvertently prevent some users from viewing the content in modals that have heights greater than the viewport height. The scroll event is not cancelable.