Re: [pointerevents] Reserved pointerIds for special cases (#343)

> in theory, i thought we wanted to allow multiple mice to be used at the same time (or at least, not limit it) - though currently I think only something like X Window Manager actually allows this in practice (from what I heard, never tried it).

@patrickhlauke: We investigated the multi-mouse scenario when we implemented (in Chrome) compat mouse event support for multiple active pointers (there can be at most 3 active pointers simultaneously, one per `pointerType`).  Every OS we tried shows a _single_ mouse pointer on screen if multiple mice are attached.  IIRC Windows is the only OS that actually "remembers" every mouse position even though it still shows only the pointer that has moved last.  Based on these observations, we concluded that compat mouse events (in particular `mouseover`/`out`/`enter`/`leave` events) for the multiple active pointers case should be wired based on a "single pointer on screen" idea.  Let's not revisit this assumption unless it becomes necessary :)

> I don't think it'd be good practice to encourage authors to start relying on that ... they should be checking pointerType and, if necessary, keeping track of whatever pointerId that event has...

This makes perfect sense but I still worry about backward compatibility because Edge shipped mouse id == 1 many years before [Chromium did](https://codereview.chromium.org/1426643008).  I remember having discussions with @NavidZ when we [decided to reserved](https://bugs.chromium.org/p/chromium/issues/detail?id=546658#c3) a mouse-specific id, but I can't remember if we saw a specific breakage.

> Yeah, I think it would be easier to understand. Negative values after all have been used often for "error" or "non-valid" cases in traditional APIs.

@smaug----: I agree with this interpretation.  But since a click event from keyboard interaction is neither an error nor an invalid event, isn't it better if we avoid a negative `pointerId` for this case?

-- 
GitHub Notification of comment by mustaqahmed
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/343#issuecomment-748195539 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 18 December 2020 16:40:37 UTC