Re: [pointerevents] Clarify how to handle removed pointer capture element (#551)

Ah, so, unclear scenario is:

1. `A.setPointerCapture(n)`
2. `B.setPointerCapture(n)`
3. `lostpointercapture` event listener moves `B` (then, pending element should be cleared)
4. Then, `gotpointercapture` should not be fired on `B` even if it's connected

Right?

Oh, but how do you handle this case?

1. `A.setPointerCapture(n)`
2. `B.setPointerCapture(n)`
3. `lostpointercapture` event listener moves `B` (then, pending element should be cleared) and call `B.setPointerCapture(n)` again.
4. Then, `gotpointercapture` should not be fired on `B`?

In theory, the pending pointer capture should be handled at next time and `gotpointercapture` should not be fired. However, it's hard to distinguish whether the `B` was removed temporarily or not...

-- 
GitHub Notification of comment by masayuki-nakano
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/551#issuecomment-2868570532 using your GitHub account


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

Received on Saturday, 10 May 2025 07:15:07 UTC