Summary: Pointer Events defines `|click|`, `auxclick`, `contextmenu` event target should be the same target as its source event if and only if the source event is a `|pointerdown|` or a `|pointerup|` and the pointer is captured at dispatching the source event (the source event of `|contextmenu|` may be `|pointerdown|`, which depends on when the OS dispatches the native `|contextmenu|`). Currently, we conform to the case when the source event is `pointerup`.

I.e., we change the behavior when:

 * pressing and releasing a button of mouse and the web app explicitly
   capture the mouse
 * single tapping and the web app explicitly capture the touch
 * single tapping and the web app does not release the implicit capture
   of the touch  (the traditional behavior for a tap)

So, we don't change the behavior when:

 * pressing and releasing a button of mouse and the web app does not
   capture the mouse (the traditional behavior for a mouse button press)
 * single tapping and the web app explicitly release the capture of the
   touch
 * pressing the secondary button of mouse and `|contextmenu|` is dispatched

This means that we don't change the traditional behavior of the mouse click.

Finally, we need to fix the last case, i.e., `|contentmenu|` dispatched without `|pointerup|` in a follow up bug.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1885232

Specification: https://w3c.github.io/pointerevents/#event-dispatch (the last paragraph of the step #3)

Preferences: `|dom.w3c_pointer_events.dispatch_click_on_pointer_capturing_element|`

web-platform-tests: https://wpt.fyi/results/pointerevents?label=master&label=experimental&aligned&q=pointerevent_click_during_capture <https://wpt.fyi/results/pointerevents?label=master&label=experimental&aligned&q=pointerevent_click_during_capture>

--
Masayuki Nakano<[email protected]>
Working on DOM, Events, editor and IME handling for Gecko

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/c643e565-3d1e-47c5-ba50-b87bb39df394%40d-toybox.com.

Reply via email to