Intent to Ship: Make wheel event listeners passive by default on the root

Skip to first unread message

Emilio Cobos Álvarez

Oct 26, 2020, 12:45:49 PM10/26/20
to Mozilla
Summary: Make wheel / DOMMouseScroll / MozMousePixelScroll event
listeners on the root passive by default.

This effectively aligns with Chromium (see [1]), and with touchstart /
touchmove events.

Bug: 1673278

Standard: None, this is an intervention, though is loosely
related. is the main discussion.

Platform coverage: all

Preference: dom.event.default_to_passive_wheel_listeners

DevTools bug: N/A

Other browsers: Chromium-based browsers ship this since basically
forever. WebKit doesn't implement this, but it does implement a similar
quirk for touch events (as above), and I think implementing this would
allow them to get rid of a nasty hack in their events code too[2]
(interestingly chromium still keeps their smoothscroll.js intervention,
though I think it's just dead code at this point, I filed [3] for that).

web-platform-tests: This is not tested by WPT, as it's an intervention.
If WebKit decides to implement we should probably put this in a spec and
move tests there.


-- Emilio


Anne van Kesteren

Oct 28, 2020, 6:18:54 AM10/28/20
to Emilio Cobos Álvarez, Mozilla
On Mon, Oct 26, 2020 at 5:45 PM Emilio Cobos Álvarez <> wrote:
> Standard: None, this is an intervention, though
> is loosely
> related.

I'm not sure "it's an intervention" is sufficient reason as making
breaking changes to the web platform is not great for web developers,
but the fact that both Chrome and Safari already do this is, somewhat.
There is which hasn't been
looked at since there only was one interested implementer. You should
probably take a look at that if that roughly matches part of the
changes you had to make. (Not sure who should own the "default passive
algorithm" for the root element though, HTML?)

Emilio Cobos Álvarez

Oct 28, 2020, 7:52:25 AM10/28/20
to Anne van Kesteren, Mozilla
Given Safari and us have been shipping the similar touch event
intervention for a long while it seems we should really merge that.

The IDL changes match the relevant gecko commit for that one:

Regarding to who should own the default algorithm probably HTML? Or

 -- Emilio

Reply all
Reply to author
0 new messages