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 the test-case in the chromium issue for an example.
I proposed to handle it in Gecko the same way content removal is handled, but @smaug---- disagreed. I think it's simpler to do it that way since then you don't need to differentiate when you're getting re-assigned from when you're getting assigned to an unexisting slot for example.
Anyhow, should the focus be kept in the same element silently? Or should the focus be removed the same way it happens for content removals? Same for :active.
The text was updated successfully, but these errors were encountered:
emilio
changed the title
What should happen to focus and active change when the flat tree changes?
What should happen to hover, focus and active chains when the flat tree changes?
Jul 24, 2019
One case where I'd be surprised to lose focus: if you attach a shadow root to an element in your ancestor chain and just add a slot to it. No rendering changes, but focus lost?
With my implementor hat on, handling it as a DOM remove/add is simpler, of course.
if you attach a shadow root to an element in your ancestor chain and just add a slot to it. No rendering changes, but focus lost?
Yeah, this would be indeed a surprising behavior. I tend to agree with @smaug---- here that the expectation is to keep focus, hover, active, etc... states intact.
All browsers have similar invalidation issues:
See the test-case in the chromium issue for an example.
I proposed to handle it in Gecko the same way content removal is handled, but @smaug---- disagreed. I think it's simpler to do it that way since then you don't need to differentiate when you're getting re-assigned from when you're getting assigned to an unexisting slot for example.
Anyhow, should the focus be kept in the same element silently? Or should the focus be removed the same way it happens for content removals? Same for
:active
.cc @lilles @rniwa @annevk
The text was updated successfully, but these errors were encountered: