You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See discussion in https://github.com/whatwg/html/pull/7079. Including the effects of that PR, focusing and unfocusing (e.g. via focus() and blur()) a delegatesFocus shadow host uses the flat tree: given
#474
Closed
966563058015 opened this issue
Oct 13, 2021
· 1 comment
See discussion in whatwg/html#7079. Including the effects of that PR, focusing and unfocusing (e.g. via focus() and blur()) a delegatesFocus shadow host uses the flat tree: given
I find delegating focus to stuff outside the shadow tree a bit weird, because you call focus(), the focus changes, but activeElement is not the host, and the host doesn't match :focus either.
I'm not sure why delegatesFocus was specified to look for focusable elements using the flat tree rather than the shadow-including tree of the shadow root, seems really weird.
which I tend to agree with. Recall that the main use cases for delegatesFocus are things like <input type="date"> where you want to focus things in the shadow DOM, not the light DOM.
Hi @966563058015, I'm closing this as off topic. Please see our Contributing.md for the types of feedback we're looking for on our Site Policies in this repo.
See discussion in whatwg/html#7079. Including the effects of that PR, focusing and unfocusing (e.g. via
focus()
andblur()
) a delegatesFocus shadow host uses the flat tree: giventhe
<div>
will be focused, and if you inserthost.blur()
afterward, the div will be blurred.@emilio states
which I tend to agree with. Recall that the main use cases for delegatesFocus are things like
<input type="date">
where you want to focus things in the shadow DOM, not the light DOM.__Originally posted by @domenic in whatwg/html#7207
The text was updated successfully, but these errors were encountered: