[csswg-drafts] [css-om-view] How do mousewheel events propagate? (#4680)

smfr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-om-view] How do mousewheel events propagate? ==
https://drafts.csswg.org/cssom-view/#scrolling

We don't have interop on how mouse wheel events behave in nested, abspos scrollers.'

Testcase: https://codepen.io/smfr/pen/rQZqxo

In Gecko, mousewheeling over a child scrollable element will propagate the events to any DOM ancestor that is scrollable, and, if the child is scrolled to the start/end, will trigger scrolls in that ancestor. This is the behavior you would expect from normal DOM event propagation, but doesn't necessarily match user expectation (you can end up scrolling something not under the pointer).

In WebKit/Blink, scrolls don't propagate to an ancestor if the child is absolutely positioned, even if the pointer is in a location that intersects both descendant and ancestor scroller.

No browser seems to propagate scrolls from an abspos, non-scrollable element to its scrollable DOM-ancestors (which doesn't seem to match normal DOM event propagation rules).

In addition, there are some differences in whether events inside an element, but outside its padding box (i.e. outside the scrollable part) trigger scrolling.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4680 using your GitHub account

Received on Saturday, 18 January 2020 00:33:36 UTC