Use overscroll-behavior: contain to prevent a page from scrolling while a dialog is open https://www.bram.us/2025/11/25/use-overscroll-behavior-contain-to-prevent-a-page-from-scrolling-while-a-dialog-is-open/

Use overscroll-behavior: contain to prevent a page from scrolling while a <dialog> is open
Chrome 144 features a small change to overscroll-behavior: it now also works on non-scrollable scroll containers. While this change might seem trivial, it fixes an issue developers have been dealing with for ages: prevent a page from scrolling while a (modal) <dialog> is open.
www.bram.us · Bram.us
Link author:
Bramus@bramus@front-end.social