![]() We can make a huge dent to open-modal-page-scrolling ™ by setting the height of the entire body to the full height of the viewport and hiding vertical overflow when the modal is open: body.modal-open px` The good news is that we can prevent that with a sprinkle of CSS (and JavaScript) trickery. Anything else, though, we’re looking at Scroll City. Sometimes this is a non-issue, like screens that are the exact height of the viewport. It may stay in place (assuming that’s what it’s meant to do) but the rest of page continues to behave as normal.Īvoid body scrollable in safari when modal dialog shown by Geoff Graham ( CodePen. That’s because modals are elements on a page just like any other. ![]() ![]() You open a modal, scroll through it, close it, and wind up somewhere else on the page than you were when you opened the modal. Please stop me if you’ve heard this one before. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |