New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What happens if the delegated element is also a shadow host with delegatesFocus set #5052
Comments
Oh yeah you're right, nice catch. The chrome implementation is already recursive, I'll update the spec tonight. |
Oh wait nope I think we're already handling it. Shadow hosts with delegatesFocus=true are explicitly can never be a focusable area (see table under https://html.spec.whatwg.org/multipage/interaction.html#focusable-area). First in flat tree order will be the same, whether we delegate recursively or not, since flat tree order means we're already gathering everything recursively. |
Hm... that's a good point. I guess we can just add a WPT test for this. |
Good idea. @tkent-google can you add a WPT either in Github or Gerrit as part of your focus impl work? (I'm out this week) |
Ok, here it is: web-platform-tests/wpt#20079 |
WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=203869 |
…nd nested shadow hosts., a=testonly Automatic update from web-platform-tests shadow-dom: Add test cases for focus() and nested shadow hosts. (#20079) Closes whatwg/html#5052 -- wpt-commits: c1e7abe048f9baee56488c23971ee4af08336886 wpt-pr: 20079
…nd nested shadow hosts., a=testonly Automatic update from web-platform-tests shadow-dom: Add test cases for focus() and nested shadow hosts. (#20079) Closes whatwg/html#5052 -- wpt-commits: c1e7abe048f9baee56488c23971ee4af08336886 wpt-pr: 20079
…nd nested shadow hosts., a=testonly Automatic update from web-platform-tests shadow-dom: Add test cases for focus() and nested shadow hosts. (#20079) Closes whatwg/html#5052 -- wpt-commits: c1e7abe048f9baee56488c23971ee4af08336886 wpt-pr: 20079 UltraBlame original commit: 45b376ea5dbb855f9e7689f8066ce0c3382862fc
…nd nested shadow hosts., a=testonly Automatic update from web-platform-tests shadow-dom: Add test cases for focus() and nested shadow hosts. (#20079) Closes whatwg/html#5052 -- wpt-commits: c1e7abe048f9baee56488c23971ee4af08336886 wpt-pr: 20079 UltraBlame original commit: 45b376ea5dbb855f9e7689f8066ce0c3382862fc
…nd nested shadow hosts., a=testonly Automatic update from web-platform-tests shadow-dom: Add test cases for focus() and nested shadow hosts. (#20079) Closes whatwg/html#5052 -- wpt-commits: c1e7abe048f9baee56488c23971ee4af08336886 wpt-pr: 20079 UltraBlame original commit: 45b376ea5dbb855f9e7689f8066ce0c3382862fc
It seems that the current logic in the focusing step doesn't take into the account the possibility that the first element in the flat tree UA picks might also be a shadow host with
delegatesFocus
set.In such cases, don't we need to recursively resolve the delegated element? Neither the spec nor WebKit's implementation has this logic.
The following test case shows that Chrome's current implementation seems to delegate the focus recursively:
The text was updated successfully, but these errors were encountered: