- From: Mustaq Ahmed via GitHub <sysbot+gh@w3.org>
- Date: Tue, 02 Aug 2022 17:29:46 +0000
- To: public-pointer-events@w3.org
The spec deliberately leaves out a direct mapping between pointer/mouse pointers for over/enter/out/leave events because the compat mouseover/enter/out/leave events must appear consistent to a mouse-events based app (that doesn't listen to Pointer Events) _even when_ we have simultaneous primary pointers of different types ("mouse", "touch" and "pen"). The core requirement here is that the compat event sequence must consistently represent the movement of a **single legacy mouse** when multiple pointer-types are active at the same time. Let's look closely at an example. Consider a mouse-press on button A followed by a touch-down a button B, before neither the mouse nor the touch is released. If we ignore the compat mouse events for a moment, the outcome is obvious: - the first action would fire `pointerover`, `pointerenter` and `pointerdown` at A with `pointerType="mouse"`, and - the second action would fire `pointerover`, `pointerenter` and `pointerdown` at B with `pointerType="touch"`. Now the compat mouse events seen by buttons A and B must include the transition of a single legacy mouse pointer from A to B before the second action, so: - the first action would fire `mouseover`, `mouseenter` and `mousedown` at A, and - the second action would fire `mouseout` and `mouseleave` at A, followed by `mouseover`, `mouseenter` and `mousedown` at B. [Section 11.1](https://w3c.github.io/pointerevents/#tracking-the-effective-position-of-the-legacy-mouse-pointer) was added to clarify this idea but the discussion in this issue suggests that a textual description is not enough to explain the complexity here! Perhaps we need to add an example with a diagram? -- GitHub Notification of comment by mustaqahmed Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/454#issuecomment-1203018386 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 2 August 2022 17:29:48 UTC