[w3c/uievents] Change DOM_DELTA_PIXEL to be intended scroll distance instead of exact scroll distance (#249)

In Edge when we scroll we actually scroll a percentage of the scroller's bounds for every wheel tick. We've found this leads to a more consistent scrolling experience and ensures that regardless of scroller size the user get's a proportionate scroll every time. When we did this in EdgeHTML we misreported the deltaY value to always be a percentage of the root scroller (we didn't account for sub-scrollers).

In Chromium we actually try to follow the spec and report the distance for deltaY however we've noticed compatibility issues with websites who implement their own custom scrolling behavior. Specifically, it's non-obvious which scroller the percentage was resolved against. Consider the scenario where an element is overlaying a scroller and is listening to the wheel event. If the listening element's ancestor is not the scroller, the percentage is resolved against some outer scroller. This causes the reported delta value to not be accurate for what the page is intending to do.

To that end for compatibility the DOM_DELTA_PIXEL value should be allowed to be the intended scroll distance the browser thinks it should scroll instead of the actual pixel value.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/249

Received on Monday, 11 November 2019 23:13:29 UTC