Prevent page scrolling when a modal is open

Brad Wu / filed under HTML & CSS, Javascript

Please stop me if you’ve heard this one before. 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. That’s because modals are elements on a page just like any other. It may stay in place (assuming that’s what it’s […]

Subscribe to newsletter

Best design and frontend links delivered to your inbox every day and week. No spam, unsubscribe at anytime.

Choose frequency

Permission
Privacy Policy