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

Shouldn't dispatch gotpointercapture and lostpointercapture events if pointerrawupdate event is fired without the following pointermove? #511

Closed
masayuki-nakano opened this issue Aug 13, 2024 · 3 comments

Comments

@masayuki-nakano
Copy link

masayuki-nakano commented Aug 13, 2024

pointerawupdate may be fired more frequently than pointermove so that some pointerrawupdate event may not be immediately followed by pointermove event. Therefore, if pointerrawupdate is dispatched but the web app do not listen to it, it looks like that gotpointercapture and lostpointercapture may be dispatched without any other pointer events.

I think that "fire a pointer event" section should define they won't be dispatched at before pointerrawupdate (at least if it's not followed by pointermove).

Or, the spec should mention about that adding a pointerrawupdate event listener will change the timing of caputre event.

@masayuki-nakano
Copy link
Author

Ah, but pointerrawupdate does not change the order of pointer boundary events vs. pointer capture events.

Before firing this event, the user agent SHOULD treat the target as if the pointing device has moved over it from the previousTarget for the purpose of ensuring event ordering [UIEVENTS]. If the needsOverEvent flag is set, a pointerover event is needed even if the target element is the same.

So, it seems safe to dispatch them even without pointermove.

@smaug----
Copy link
Contributor

@masayuki-nakano So we could close this?

@masayuki-nakano
Copy link
Author

Indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants