-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Unfocusing steps should account for delegatesFocus
somehow
#7070
Comments
Makes sense. Are you able to figure out a rough spec patch that would fix this? Either as a PR, or just writing it up informally here and I can translate it, would be great. |
…emilio This intends to address: whatwg/html#7070 Differential Revision: https://phabricator.services.mozilla.com/D125477
@domenic I think around step 2 we should say something like "if old focus target is a shadow host, and its shadow root delegates focus, and the currently focused area of a top-level browsing context is a shadow-including descendant of the shadow root, then let old focus target be the currently focused area of a top-level browsing context." Or something like that. |
Sounds good. My tentative guess it it should be the very first step, right? Since we probably want to do inert checking/area stuff on the "computed" old focus target, not the original. I'll send a PR shortly. |
…emilio This intends to address: whatwg/html#7070 Differential Revision: https://phabricator.services.mozilla.com/D125477
This intends to address: whatwg/html#7070 Differential Revision: https://phabricator.services.mozilla.com/D125477 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1730566 gecko-commit: 8fb7f5a7c65404c7d157e61f29b093c5a50f343d gecko-reviewers: emilio
This intends to address: whatwg/html#7070 Differential Revision: https://phabricator.services.mozilla.com/D125477 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1730566 gecko-commit: 8fb7f5a7c65404c7d157e61f29b093c5a50f343d gecko-reviewers: emilio
This intends to address: whatwg/html#7070 Differential Revision: https://phabricator.services.mozilla.com/D125477 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1730566 gecko-commit: 8fb7f5a7c65404c7d157e61f29b093c5a50f343d gecko-reviewers: emilio
* Make it use the shadow tree instead of the flat tree. Closes whatwg#7207. * Make it work with the unfocusing steps symmetrically to the focusing steps. Closes whatwg#7070.
* Make it use the shadow tree instead of the flat tree. Closes whatwg#7207. * Make it work with the unfocusing steps symmetrically to the focusing steps. Closes whatwg#7070.
Calling
blur()
on a shadow host withdelegatesFocus = true
should blur content inside the shadow tree. This matches sanity (blur()
should undo whatfocus()
does) and both WebKit and Blink.However per spec this shouldn't happen.
blur()
executes https://html.spec.whatwg.org/#unfocusing-steps, but if you call that on a shadow host with delegatesFocus you bail out here:Unless I'm missing something, since neither https://html.spec.whatwg.org/#current-focus-chain-of-a-top-level-browsing-context or https://html.spec.whatwg.org/#focus-chain deal with
delegatesFocus
in any way (and I don't think they should, probably).See https://bugzilla.mozilla.org/show_bug.cgi?id=1730566 for a test-case.
The text was updated successfully, but these errors were encountered: