WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
218860
Events delivered when all event listeners in the ancestor chain are passive should be cancelable=false
https://bugs.webkit.org/show_bug.cgi?id=218860
Summary
Events delivered when all event listeners in the ancestor chain are passive s...
Simon Fraser (smfr)
Reported
2020-11-12 11:09:54 PST
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
Comment 1
2020-11-12 11:10:19 PST
<
rdar://problem/71334287
>
Simon Fraser (smfr)
Comment 2
2020-11-12 11:11:41 PST
Note that Chrome does this, Gecko does not.
Emilio Cobos Álvarez (:emilio)
Comment 3
2020-11-12 14:42:20 PST
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
Comment 4
2020-11-12 14:56:52 PST
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
Comment 5
2020-11-12 14:58:23 PST
Corresponding spec for Wheel events:
https://w3c.github.io/uievents/#cancelability-of-wheel-events
Simon Fraser (smfr)
Comment 6
2020-11-12 15:08:08 PST
I filed
https://github.com/w3c/uievents/issues/282
on clarifying this for wheel events.
Simon Fraser (smfr)
Comment 7
2020-11-12 16:09:32 PST
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
Comment 8
2020-11-12 21:33:15 PST
Changing the event type based on the type of event listeners seem very strange & weird.
Simon Fraser (smfr)
Comment 9
2020-12-03 15:05:47 PST
We'll do this now if the event starts in the passive event listener region.
Ahmad Saleem
Comment 10
2022-09-12 14:40:54 PDT
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
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug