- From: Masayuki Nakano via GitHub <sysbot+gh@w3.org>
- Date: Mon, 06 Jan 2025 06:10:11 +0000
- To: public-pointer-events@w3.org
masayuki-nakano has just created a new issue for https://github.com/w3c/pointerevents: == Define `pointermove` and `pointerrawupdate` may have delta from previous corresponding pointer event as `movementX` and `movementY` == `MouseEvent.movementX` and `MouseEvent.movementY` are [extensions of Pointer Lock 2.0](https://w3c.github.io/pointerlock/#extensions-to-the-mouseevent-interface) and the spec of Pointer Events does not refer these attributes. As of current definition, those values of `pointermove` and `pointerrawupdate` should be `0`. However, Chromium explicitly sets them. * [Computing the value](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/events/pointer_event_factory.cc;l=87-103;drc=f39c57f31413abcb41d3068cfb2c7a1718003cc5) * [Retrieving the last position](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/events/pointer_event_factory.cc;l=408-428;drc=f39c57f31413abcb41d3068cfb2c7a1718003cc5) * [Storing the last position at dispatching a pointer event](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/input/pointer_event_manager.cc;l=916-918;drc=f39c57f31413abcb41d3068cfb2c7a1718003cc5) I think that the Chromium's behavior is reasonable and Mozilla got [a bug report](https://bugzilla.mozilla.org/show_bug.cgi?id=1939550) about this. So, I suggest that the spec of Pointer Events should define `pointermove` and `pointerrawupdate` may have non-zero values of `movementX` and `movementY`. * If the event type is `pointermove`, the source event of the last position should be `pointerdown`, `pointermove` or `pointerup` which had same `pointerId` * If the event type is `pointerrawupdate`, the source event of the last position should be `pointerrawupdate` which had same `pointerId` * At same time of Pointer Lock definition, the last position should be reset. Then, it would be better to redesign the type of `movementX` and `movementY` are `double`, but it must be better browsers to keep rounding the values of `MouseEvent` to integer for backward compatibility. Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/535 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 6 January 2025 06:10:12 UTC