Skip to content

Unclear if pointermove should set movementX/Y #100

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

Open
daxpedda opened this issue Jun 29, 2024 · 4 comments · May be fixed by #101
Open

Unclear if pointermove should set movementX/Y #100

daxpedda opened this issue Jun 29, 2024 · 4 comments · May be fixed by #101

Comments

@daxpedda
Copy link

daxpedda commented Jun 29, 2024

According to the spec:

pointerlock/index.html

Lines 629 to 630 in 0e99fcf

{{movementX}} and {{movementY}} must be zero for all mouse events
except `mousemove`. All motion data must be delivered via

Which seems to imply that movementX/Y should be zero for pointermove. Is this intentional?

See https://bugzilla.mozilla.org/show_bug.cgi?id=1753724, where this has come up.

@mustaqahmed
Copy link
Member

Thanks for the catch, I believe this is unintentional because the text predates cross-browser support for PointerEvents.

FYI: in Chrome we set movementX/Y in pointermove events. If I recall correctly, when shipping PointerEvents we interpreted the spec text:

... all mouse events except mousemove

as

... all MouseEvents except mousemove

which leaves PointerEvents unspecified here. So we extended the mousemove behavior to pointermove.

@daxpedda
Copy link
Author

daxpedda commented Jul 5, 2024

Thanks!

Should I open a PR doing that exact change?
Or should it rather just say "except mousemove and pointermove"?

@mustaqahmed
Copy link
Member

Or should it rather just say "except mousemove and pointermove"?

This sounds better.

@daxpedda daxpedda linked a pull request Jul 7, 2024 that will close this issue
@smaug----
Copy link

which leaves PointerEvents unspecified here

Well, the spec says that the properties are 0 by default, and nothing says they should be something else on pointermove, so ... ;)

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

Successfully merging a pull request may close this issue.

3 participants