Comments on: Scroll-Locked Dialogs https://frontendmasters.com/blog/scroll-locked-dialogs/ Helping Your Journey to Senior Developer Thu, 12 Sep 2024 15:20:25 +0000 hourly 1 https://wordpress.org/?v=6.9 By: Jano https://frontendmasters.com/blog/scroll-locked-dialogs/#comment-11192 Thu, 12 Sep 2024 07:52:26 +0000 https://frontendmasters.com/blog/?p=938#comment-11192 Love the simplicity of this technique! That said, applying it to the <html> element instead of the <body> might make it a bit more bulletproof, as I recently experienced on a page that had the <html> set to overflow-y: scroll by default, which caused the body to keep scrolling even after applying overflow: hidden to it.

]]>
By: Steffen https://frontendmasters.com/blog/scroll-locked-dialogs/#comment-956 Fri, 23 Feb 2024 19:49:42 +0000 https://frontendmasters.com/blog/?p=938#comment-956 Unfortunately, Chrome has a bug that prevents “scrollbar-gutter: stable” from affecting “position: fixed” elements: https://issues.chromium.org/issues/40792788

]]>
By: Tyler Sticka https://frontendmasters.com/blog/scroll-locked-dialogs/#comment-865 Wed, 21 Feb 2024 16:08:27 +0000 https://frontendmasters.com/blog/?p=938#comment-865 I opened a CSSWG issue for managing which element controls scrolling back in 2020, but it hasn’t seen much activity: https://github.com/w3c/csswg-drafts/issues/4710

I’m surprised and disappointed by that… I try to avoid modals and overlays as much as I can, but it’s silly for them to remain this challenging. 🤷

]]>