If a pointer is captured while the `pointerup` event is being dispatched, the `click` event will be dispatched to the captured target instead of the nearest common ancestor of `pointerdown` and `pointerup` events as per the UI Event spec. For uncaptured pointers, the `click` target remains unchanged.
PEWG agreed to this new behavior after a multi-year deliberation [1] and updated the PointerEvents spec in 2023 [2]. The primary motivation for this decision is to make click targets more developer-friendly when pointer-capture. Note that the original "nearest common ancestor" targeting was defined in the UI Event spec many years before the pointer-capture concept was avalable. [1] https://github.com/w3c/pointerevents/issues/356 [2] https://github.com/w3c/pointerevents/pull/474
Samples: https://codepen.io/mustaqahmed/full/YzawKWW
Explainers: https://w3c.github.io/pointerevents/#event-dispatch