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

51 views
Skip to first unread message

Emilio Cobos Álvarez

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

In bug 1708829 I'm implementing some deprecated attributes of
WheelEvent, since our change to start returning pixels instead of lines
in WheelEvent.delta* 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.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1708829

Standard: https://github.com/w3c/uievents/issues/305

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
Forward
0 new messages