DEV Community

Discussion on: Is bubbling scroll events terrible?

ben profile image
Ben Halpern

I think the typical way this is dealt with is that onmouseenter the the page's body is given a class that disables scrolling (overflow hidden or something like that) and then on onmouseout, that class is removed and normal scrolling is restored.

It's kind of a pain to deal with so my calculus has always revolved around just how much this affects the overall user experience. If it's a behavior they need to do often, or as one of only a few things they'd do on the site, I'd go all in on making it right. If it's a small thing that doesn't happen often, I'd accept a non-perfect user experience as not the end of the world.