Bug 218860
Summary: | Events delivered when all event listeners in the ancestor chain are passive should be cancelable=false | ||
---|---|---|---|
Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ahmad.saleem792, cdumez, emilio, rniwa, simon.fraser, webkit-bug-importer |
Priority: | P2 | Keywords: | BrowserCompat, InRadar, WPTImpact |
Version: | Safari Technology Preview | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=218861 |
Simon Fraser (smfr)
Wheel/touch events delivered to passive event listeners should have their `cancelable` property set to false.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/71334287>
Simon Fraser (smfr)
Note that Chrome does this, Gecko does not.
Emilio Cobos Álvarez (:emilio)
Should the cancelability of the event really depend on the listener? What do we do for other events, or if there are both passive and non-passive listeners?
Chris Dumez
https://w3c.github.io/touch-events/#cancelability
"""
In particular, a user agent may generate only uncancelable touch events when it observes that there are no non-passive listeners for the event.
"""
Chris Dumez
Corresponding spec for Wheel events:
https://w3c.github.io/uievents/#cancelability-of-wheel-events
Simon Fraser (smfr)
I filed https://github.com/w3c/uievents/issues/282 on clarifying this for wheel events.
Simon Fraser (smfr)
Looking at blink code, it appears (for touch events at least) to set the event to non-cancelable if all the event listeners in the ancestor chain of the target element have passive listeners. My testing suggests that the same is true for wheel event listeners.
Ryosuke Niwa
Changing the event type based on the type of event listeners seem very strange & weird.
Simon Fraser (smfr)
We'll do this now if the event starts in the passive event listener region.
Ahmad Saleem
Safari is failing quite a few tests:
https://wpt.fyi/results/dom/events/non-cancelable-when-passive?label=master&label=experimental&aligned&view=subtest&q=non-cancelable