Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the event target of pointermove if an event listener of the preceding pointerrawupdate explicitly release pointer capture #509

Open
masayuki-nakano opened this issue Aug 13, 2024 · 2 comments
Labels
needs-wpt Investigation whether the issue needs a wpt test has been done and wpt is missing v3

Comments

@masayuki-nakano
Copy link

https://w3c.github.io/pointerevents/#the-pointerrawupdate-event

The target of pointerrawupdate events might be different from the pointermove events due to the fact that pointermove events might get delayed or coalesced, and the final position of the event which is used for finding the target could be different from its coalesced events.

In terms of ordering of pointerrawupdate and pointermove, if the user agent received an update from the platform that causes both pointerrawupdate and pointermove events, then the user agent MUST dispatch the pointerrawupdate event before the corresponding pointermove.

Other than the target, the concatenation of coalesced events lists of all dispatched pointerrawupdate events since the last pointermove event is the same as the coalesced events of the next pointermove event in terms of the other event attributes. The attributes of pointerrawupdate are mostly the same as pointermove, with the exception of cancelable which MUST be false for pointerrawupdate.

It seems that these paragraphs imply that the following pointermove event target should be considered with the latest capturing state after dispatching pointerawupdate, however, it means that the dispatcher in the browsers need to recompute the target. Therefore, I'd like to confirm that how the spec editors thought about this when they wrote.

@smaug----
Copy link
Contributor

smaug---- commented Nov 6, 2024

The target can be different, isn't " final position of the event which is used for finding the target could be different from its coalesced events" quite clear. And that also basically says that one needs to do anew hit-testing, or otherwise recompute the target.

@masayuki-nakano do you think there is something to clarify here?

@masayuki-nakano
Copy link
Author

Okay, then, there should be a test to check it.

@patrickhlauke patrickhlauke added needs-wpt Investigation whether the issue needs a wpt test has been done and wpt is missing v3 labels Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-wpt Investigation whether the issue needs a wpt test has been done and wpt is missing v3
Projects
None yet
Development

No branches or pull requests

3 participants