pointerrawupdate event does not set movementX/Y
Categories
(Core :: DOM: Events, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox148 | --- | fixed |
People
(Reporter: ashley, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, webcompat:platform-bug)
User Story
user-impact-score:400
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0
Steps to reproduce:
When the pointerrawupdate event fires, in Firefox the movementX and movementY properties are always 0. In Chrome these values are set to reflect the pointer movement similar to the regular pointermove events.
Actual results:
Pointer event movementX/Y properties always 0 in pointerrawupdate events
Expected results:
Pointer event movementX/Y properties to reflect actual pointer movement in pointerrawupdate events
Comment 1•7 months ago
|
||
Per specification "movementX and movementY must be zero for all mouse events except mousemove."
https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface
There is https://github.com/w3c/pointerlock/issues/100 and
https://github.com/w3c/pointerevents/issues/535
Updated•7 months ago
|
Updated•4 months ago
|
| Assignee | ||
Comment 2•4 months ago
|
||
I'll post a patch soon.
| Assignee | ||
Comment 3•4 months ago
|
||
Although this has not been standardized yet [1][2]. However, Chromium
has already supported this and that must be reasonable for web
developers.
This patch adds the support with a new pref.
However, as written with XXX comment, I think movementX and
movementY of pointermove and pointerrawupdate should be stored per
pointerId. However, let's keep the existing way for pointermove for
now.
Updated•4 months ago
|
Comment 5•4 months ago
|
||
Sounds like https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX and https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY plus their related BCD should be updated to reflect that.
Sebastian
Comment 6•4 months ago
|
||
| bugherder | ||
| Assignee | ||
Comment 7•4 months ago
|
||
(In reply to Sebastian Zartner [:sebo] from comment #5)
Sounds like https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementX and https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/movementY
Right, and oh, they explain the non-zero values are not available with pointermove. That is currently wrong.
https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface
movementX and movementY must be zero for all mouse events except mousemove and pointermove.
And the values of pointerrawupdate are difference from the preceding pointerrawupdate or pointermove. If multiple pointerrawupdate events are fired between 2 pointermove events, 1st one has the difference from the previous pointermove but the others have the difference from the previous pointerrawupdate.
And I believe that they for pointermove and pointerrawupdate should have the difference from preceding pointermove or pointerrawupdate whose pointerId is the same one. However, at least, Gecko does not work so for now. However, this thing is not mentioned in the any specs such as Pointer Lock 2.0 nor Pointer Events.
| Assignee | ||
Comment 8•4 months ago
|
||
Filed a spec bug for the last issue: https://github.com/w3c/pointerlock/issues/104
Updated•2 months ago
|
Comment 9•2 months ago
•
|
||
FF148 MDN work for this can be tracked in https://github.com/mdn/content/issues/42752. It is complete, but I'd welcome a sanity check on https://github.com/mdn/content/pull/42929 and https://github.com/mdn/browser-compat-data/pull/28920?
Updated•2 months ago
|
Comment 10•2 months ago
|
||
Did the review. From my side the changes look fine. Thank you, Hamish! Masayuki, maybe you can also have a quick look in case I missed anything?
Sebastian
| Assignee | ||
Comment 11•2 months ago
|
||
Yeah, the text looks fine, I don't know about the structure change of the document (increasing some headings, etc).
Thank you!
Description
•