Closed
Bug 1500273
Opened 6 years ago
Closed 5 years ago
Shift-Tab does not take the focus back to input inside Shadow DOM
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla66
People
(Reporter: timdream, Assigned: edgar)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
771 bytes,
text/html
|
Details | |
1004 bytes,
text/html
|
Details | |
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
STR: See test case, which creates a DOM like <body> <input> #1 <span tabIndex="0"> #2 shadowRoot <input> #3 <input> #4 <input> #5 <input> #6 Expected 1. Focus on #1 and press tab will take focus from #1 to #6 2. Focus on #6 and press Shift+Tab will take focus backward from #6 to #1 Actual 1. as expected 2. focus jumps from #6 to #1 Note This is not what I saw in https://bugzilla.mozilla.org/show_bug.cgi?id=1496242#c3 . I am not sure if they are related.
Reporter | ||
Comment 1•6 years ago
|
||
This one does what's expected: <body> <input> #1 <span tabIndex="0"> #2 shadowRoot <span tabIndex="0"> #3 <span tabIndex="0"> #4 <span tabIndex="0"> #5 <input> #6
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → echen
Assignee | ||
Comment 2•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&revision=c7a6259424c0b6b83318c3a15ba5b6163718fa37&group_state=expanded
Assignee | ||
Comment 3•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&revision=ca21386ebf0a46b4ec67edb2144af9bb54abe6f5&group_state=expanded
Assignee | ||
Comment 4•5 years ago
|
||
When entering into a Shadow DOM in backward navigation, we set currentContent to the top-level host [1] but the frame still points to the last frame in Shadow DOM which could be a non-focusable frame. So we skip Shadow DOM and also the host in this case [2]. [1] https://searchfox.org/mozilla-central/rev/69f9d5002c6e3c5c571a348916fb174e6a7b4acd/dom/base/nsFocusManager.cpp#3308 [2] https://searchfox.org/mozilla-central/rev/69f9d5002c6e3c5c571a348916fb174e6a7b4acd/dom/base/nsFocusManager.cpp#3387-3394
Assignee | ||
Comment 5•5 years ago
|
||
When entering into a Shadow DOM in backward navigation, the frame still points to the last frame in Shadow DOM which could be a non-focusable frame, so move the handling of backward navigation for Shadow DOM upward.
Assignee | ||
Comment 6•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&tier=1&revision=b16f9e4e77af4bac4ff0655763dd37be4e2920e9&group_state=expanded
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c93e450706ae Ensure backward focus navigation works in Shadow DOM; r=smaug
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c93e450706ae
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Updated•5 years ago
|
status-firefox65:
--- → ?
Comment 9•5 years ago
|
||
Is there a user impact here which justifies backport consideration or can this ride the trains?
Flags: needinfo?(echen)
Flags: in-testsuite+
Assignee | ||
Comment 10•5 years ago
|
||
Comment on attachment 9030241 [details] Bug 1500273 - Ensure backward focus navigation works in Shadow DOM; [Beta/Release Uplift Approval Request] Feature/Bug causing the regression: Not a regression User impact if declined: Focus backward navigation doesn't work as expected with Shadow DOM in certain cases. Is this code covered by automated tests?: Yes Has the fix been verified in Nightly?: Yes Needs manual test from QE?: No If yes, steps to reproduce: List of other uplifts needed: None Risk to taking this patch: Low Why is the change risky/not risky? (and alternatives if risky): The change isn't complicated and only affects Shadow DOM case. String changes made/needed: None
Flags: needinfo?(echen)
Attachment #9030241 -
Flags: approval-mozilla-beta?
Comment 11•5 years ago
|
||
Comment on attachment 9030241 [details] Bug 1500273 - Ensure backward focus navigation works in Shadow DOM; [Triage Comment] Fixes broken focus backward navigation with Shadow DOM in certain cases. Approved for 65.0b6.
Attachment #9030241 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 12•5 years ago
|
||
bugherder uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/a931bf550f33
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•