[w3c/uievents] Define click target when the mousedown target is removed before mouseup (PR #424)

Strawman for #423 -- not ready for review, filed to anchor the discussion.

Tracks the mousedown target per button in "handle native mouse down" and,
in "handle native mouse click", falls back when that target is
disconnected at click time:

1. pseudo-element -> its originating element (matches long-standing
   Blink/WebKit behavior)
2. node in a removed-but-rebuilt shadow tree whose host is still
   connected (e.g. SVG `<use>` instance tree) -> the shadow host
3. otherwise -> no click (matches IE/Firefox-derived behavior)

Then computes the usual nearest-common-inclusive-ancestor click target
in the flat tree.

Open questions from the issue: whether (2) should be shadow-host
specific or generalize to "nearest connected flat-tree ancestor", and
whether (1) belongs in the spec or stays legacy.

You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/uievents/pull/424

-- Commit Summary --

  * Define click target when the mousedown target is removed before mouseup

-- File Changes --

    M event-algo.bs (30)

-- Patch Links --

https://github.com/w3c/uievents/pull/424.patch
https://github.com/w3c/uievents/pull/424.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/pull/424
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/pull/424@github.com>

Received on Monday, 9 November 2026 13:06:07 UTC