Re: [csswg-drafts] [css-overflow-5]: resolving document.activeElement and focus event targets (#12239)

> Even worse, `event.target` and `event.relatedTarget` directly reference the CSS pseudo-elements and do not match `document.activeElement`.

This was most likely a bug and should have been resolved: https://issues.chromium.org/420463805

> since pseudo-elements aren't HTMLElements and don't support the .focus method

We should add the focus to CSSPseudoElement.

> No focus events fire when focus changes between pseudo-elements

I agree, we probably shouldn't fire focus for changes between pseudo-elements on the same owning element.

I don't think we could change document.activeElement to return a CSSPseudoElement, however we could add an accessor for the pseudoElement if needed similar to the idea of adding the pseudoTarget to events in https://github.com/w3c/csswg-drafts/issues/12163

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12239#issuecomment-3362366237 using your GitHub account


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

Received on Thursday, 2 October 2025 17:55:34 UTC