Intent to prototype and ship: WheelEvent.wheelDelta{,X,Y}

Skip to first unread message

Emilio Cobos Álvarez

May 14, 2021, 2:57:45 PM5/14/21
to Mozilla

In bug 1708829 I'm implementing some deprecated attributes of
WheelEvent, since our change to start returning pixels instead of lines
in* caused some sites that did something like:

if (e.wheelDelta) {
/* do something with e.wheelDelta */
} else {
/* do something with e.deltaY multiplied by a large value */

To start zooming too much.



Platform coverage: All

Preference: dom.event.wheelDelta.enabled

DevTools bug: N/A

Other browsers: Both WebKit and Blink implement this, with slightly
different behavior around the edges. We've mostly aligned with WebKit in
this regard, because their behavior is saner.

web-platform-tests: I've extended our wheel event tests to test the
specific values we return (except for one windows-specific test which I
couldn't get to work locally).

Since this is not on the spec I haven't extended the idlharness tests
yet. The actual values this API returns are system dependent so that
seems hard to test in WPT, but let me know if I'm mistaken.

-- Emilio
Reply all
Reply to author
0 new messages