If a pointer is captured while the `pointerup` event is being dispatched, the `click` event will be dispatched to the captured target instead of the nearest common ancestor of `pointerdown` and `pointerup` events as per the UI Event spec. For uncaptured pointers, the `click` target remains unchanged.
Interop risk: No risk at all because the major browsers behaved differently for years (see https://github.com/w3c/pointerevents/issues/356#issuecomment-811814819). Compat risk: There is a slight risk that the click target change would be noticed for a very narrow case of a slider-like UI element that captures the pointer yet expects a *container* element to respond to a click differently from how the slider element itself responds to the same click. For a drag action that starts on the slider and ends outside the slider, this feature would cause the click event to be dispatched to the slider then bubble up to the container (vs being dispatched to the container element directly).
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
Shipping on desktop | 135 |
Shipping on Android | 135 |
Shipping on WebView | 135 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneOn 2/5/25 10:11 AM, Mustaq Ahmed wrote:
Contact emails
mus...@chromium.org
Explainer
https://w3c.github.io/pointerevents/#event-dispatch
Specification
https://w3c.github.io/pointerevents/#event-dispatch
Summary
If a pointer is captured while the `pointerup` event is being dispatched, the `click` event will be dispatched to the captured target instead of the nearest common ancestor of `pointerdown` and `pointerup` events as per the UI Event spec. For uncaptured pointers, the `click` target remains unchanged.
Blink component
Blink>Input
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
Interop risk: No risk at all because the major browsers behaved differently for years (see https://github.com/w3c/pointerevents/issues/356#issuecomment-811814819). Compat risk: There is a slight risk that the click target change would be noticed for a very narrow case of a slider-like UI element that captures the pointer yet expects a *container* element to respond to a click differently from how the slider element itself responds to the same click. For a drag action that starts on the slider and ends outside the slider, this feature would cause the click event to be dispatched to the slider then bubble up to the container (vs being dispatched to the container element directly).
You mention difference in behavior between browsers - can you clarify what they all do today?
Also, have we done any compat analysis to have confidence in the
"slight risk" mentioned here?
Gecko: Positive (https://github.com/w3c/pointerevents/issues/356#issuecomment-1596196064)
WebKit: No signal
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAB0cuO5WP0%3DEV2%3DiQkS2Bkt8z4fKnfMFNBNeBEU76xOSsYNCHA%40mail.gmail.com.
Contact emails
mus...@chromium.org
Explainer
https://w3c.github.io/pointerevents/#event-dispatch
Specification
https://w3c.github.io/pointerevents/#event-dispatch
Summary
If a pointer is captured while the `pointerup` event is being dispatched, the `click` event will be dispatched to the captured target instead of the nearest common ancestor of `pointerdown` and `pointerup` events as per the UI Event spec. For uncaptured pointers, the `click` target remains unchanged.
Blink component
Blink>Input
TAG review
None
TAG review status
Not applicable
Risks
Interoperability and Compatibility
Interop risk: No risk at all because the major browsers behaved differently for years (see https://github.com/w3c/pointerevents/issues/356#issuecomment-811814819). Compat risk: There is a slight risk that the click target change would be noticed for a very narrow case of a slider-like UI element that captures the pointer yet expects a *container* element to respond to a click differently from how the slider element itself responds to the same click. For a drag action that starts on the slider and ends outside the slider, this feature would cause the click event to be dispatched to the slider then bubble up to the container (vs being dispatched to the container element directly).
--
My i2s message missed one important point: we are planning for an incremental rollout on Stable, just to be on the safe side from the compat perspective (see my WIP finch config cl/721367851, sorry internal link).> To move everyone toward interop, I suggest commenting on https://bugzilla.mozilla.org/show_bug.cgi?id=1885232 to encourage Firefox to fast-follow, and maybe filing a WebKit bug for the same reason.@Domenic Denicola Perhaps we can defer this until after a 100% Stable rollout, right?