Re: [pointerevents] Add context for popover light dismiss to click event (#542)

I think there are a few options to address this:
1. Expose down and up targets (or events) that resulted in the click. Popover could then ignore the click if either of the triggering events was inside the popover.
2. Add a mechanism for containing clicks across particular boundaries. The general pattern would be that clicks would not be generated if the down and up events occur on different container boundaries. E.g. if you start clicking inside a button and your mouse goes up outside of that button, perhaps it shouldn't generate a click since the button is a clickable component that you started interacting with. Strawman proposal: `pointer-contain: click` or `pointer-contain: mouse`.
3. Maybe we do (2) implicitly for popover. I.e. if you start clicking on something inside the popover, and stop outside the popover, that does not result in a click.
4. Maybe things like popover which go into the top layer should also affect the event ancestor chain (and propagation?) in a way that would result in the common ancestor of a click that starts inside the popover and ends outside of it either doesn't exist (i.e. above root) or is the root.

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


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

Received on Wednesday, 16 July 2025 16:41:14 UTC