-
Notifications
You must be signed in to change notification settings - Fork 746
Description
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.