Open Bug 1753724 Opened 2 years ago Updated 7 months ago

`pointermove` events returned by `getCoalescedEvents()` report `.movementX` and `.movementY` in absolute values, rather than relative to the previous event

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P3)

Firefox 98
defect

Tracking

()

UNCONFIRMED

People

(Reporter: alex.forrence, Unassigned)

References

Details

Steps to reproduce:

  1. Navigate to https://codepen.io/aforren1/pen/abVmEyZ for test case
  2. Toggle "mousemove (off)/pointermove (on)" on, and move mouse slowly
  3. Toggle "uncoalesce?" on, and move mouse slowly

Actual results:

In step 3, dx and dy report absolute position on page, rather than the relative position.

Expected results:

The values of dx and dy in step 3 should be relative to the previous cursor position, not absolute (approximately matching the magnitude and signs of 'mousemove' & coalesced 'pointermove').

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Positioned' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Positioned
Product: Firefox → Core
Component: Layout: Positioned → DOM: UI Events & Focus Handling
Severity: -- → S3
Priority: -- → P3

I could reproduce this with Firefox Nightly 100.0a1 on macOS 12.1.

The fun thing is that movementX/Y should be 0 always with pointer events per current specifications.

https://w3c.github.io/pointerlock/#dom-mouseevent-movementx

movementX/movementY must be zero for all mouse events except mousemove

Huh, fun indeed.

You need to log in before you can comment on or make changes to this bug.