You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pointer Events defines the event target of click, auxclick and contextmenu as same as userEvent which is fired by user's operation. So, this means that the event target may be different from the definition in UI Events because UI Events defines the event target of dblclick as:
However, Pointer Events does not override dblclick event interface and does not mention it. Therefore, in the edge cases, click event target and dblclick event target may be different. I think that it is not developer-friendly. It must cause web-compat issues if browsers do not work exactly same as current odd and implicit definitions.
I think that Pointer Events should mention about dblclick event target at least since mousedown and mouseup may be prevented by a pointerdown event handler. I hope, the dblclick event target should be same as the preceding click and there should be WPTs.
The text was updated successfully, but these errors were encountered:
While I agree dblclick target could be clarified in a similar manner, I just found this comment that it is left as-is (as a legacy event) in favor of click.detail.
I think the UI Events spec definition of dblclick target ("the event target MUST be the same between mousedown, mouseup and dblclick") is under-specified in multiple ways:
It does not consider the effect of Pointer Capture because I believe it predates Pointer Events spec.
It doesn't not specify the target if the DOM is modified in-between. For example, if the mousedown handler removes the target, will the dblclick be dispatched to the nearest common ancestor of mousedown and mouseup, or will the dispatch be skipped?
(Those are in addition to the main point you raised above: it doesn't mention if click and dblclick targets must be the same or not.)
@mustaqahmed is there anything we can/should do for this for v3, or does it require more fundamental hooks/changes? marking as future for now, please feel free to change to v3
Pointer Events defines the event target of
click
,auxclick
andcontextmenu
as same asuserEvent
which is fired by user's operation. So, this means that the event target may be different from the definition in UI Events because UI Events defines the event target ofdblclick
as:However, Pointer Events does not override
dblclick
event interface and does not mention it. Therefore, in the edge cases,click
event target anddblclick
event target may be different. I think that it is not developer-friendly. It must cause web-compat issues if browsers do not work exactly same as current odd and implicit definitions.I think that Pointer Events should mention about
dblclick
event target at least sincemousedown
andmouseup
may be prevented by apointerdown
event handler. I hope, thedblclick
event target should be same as the precedingclick
and there should be WPTs.The text was updated successfully, but these errors were encountered: