Re: [pointerevents] Clarify what event is `userEvent` to consider `click`/`auxclick` event target after `touchend` (or `pointerup`) (#508)

>     * We still don't have any evidence that the behavior defined here (and tested in [1](https://wpt.fyi/results/pointerevents/pointerevent_click_during_capture.html%3Fmouse-auxclick?label=experimental&label=master&aligned&view=interop&q=label%3Ainterop-2023-events) and [2](https://wpt.fyi/results/pointerevents/pointerevent_click_during_capture.html%3Fmouse-click?label=experimental&label=master&aligned&view=interop&q=label%3Ainterop-2023-events)) breaks the Web.  In other words, the risk remains unknown.
> 
>     * Exposing this behavior (which is a part of Interop 2024) seems to be the only way to find out any compat implications, and no browsers has tried it yet.

I have a concern about usability of web apps if browsers change the event target of touch events and compatibility mouse events. I found [a tricky code](https://searchfox.org/mozilla-central/rev/b60bff00c0fe136f35e4d6f3316911c090a39f23/layout/base/PositionedEventTargeting.cpp#434-475) in Firefox for Android, that tries to adjust event target of the compatibility mouse events to a closest element around the touch point if there is:
* the cursor style is "pointer"
* an element which listens to mouse/touch/pointer event
* a form control
* a label having target
* an element whose role is clickable
* an editable element

So, Firefox for Android makes web apps possible to handle within high-precision coordinates with touch/pointer event listeners but in rough coordinates with mouse event listeners including `click`.

After enabling the standardized behavior on Firefox, Firefox for Android users need to touch more strictly than current builds. I guess that Mozilla can update the tricky code for the new behavior, though.

If the other browsers do similar thing for users, they will also have similar regression.

-- 
GitHub Notification of comment by masayuki-nakano
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/508#issuecomment-2262034441 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 1 August 2024 04:58:56 UTC