Closed
Bug 1507101
Opened 5 years ago
Closed 5 years ago
overflow:hidden affects Shift+Tab within shadow DOM
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | verified |
People
(Reporter: serguey.kulikov, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
1.54 KB,
text/html
|
Details | |
Use StyleChildrenIterator instead of custom frame tree walking code to handle NAC inside shadow dom.
47 bytes,
text/x-phabricator-request
|
Details | Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 Steps to reproduce: 1. Create a custom element with shadow root 2. In the shadow DOM, add the div with overflow: hidden 3. In that div, place 2 focusable elements (e.g. button and input) 4. Focus the input 5. Press Shift+Tab, to move focus back to button 6. Press Shift+Tab once again https://jsfiddle.net/webpadawan/raox4mtu/ Actual results: focus moves out of the shadow root Expected results: focus returns back to the input
Reporter | ||
Comment 1•5 years ago
|
||
UPD: corrected description: Expected results: focus moves out of the shadow root Actual results: focus returns back to the input
![]() |
||
Updated•5 years ago
|
Component: Untriaged → DOM
Product: Firefox → Core
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
That's indeed a bit wild, I bet this is related to the extra anonymous box we have for overflow: hidden. Olli, let me know if you want me to look at it, from a quick look I assume the bug is around this code, right? https://searchfox.org/mozilla-central/rev/c0b26c40769a1e5607a1ae8be37fe64df64fc55e/dom/base/nsFocusManager.cpp#3353
Comment 3•5 years ago
|
||
If you have time, feel free to take a look.
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → emilio
Assignee | ||
Comment 5•5 years ago
|
||
There are lots of frames which create anonymous content (like scrollframes, which generate scrollbars) but for which this code was wrong. Use StyleChildrenIterator which has a defined order between NAC and flattened tree. I've verified this doesn't break tabbing through input type="date" with UA widget disabled, fwiw.
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/5322e59f933e Use StyleChildrenIterator instead of custom frame tree walking code to handle NAC inside shadow dom. r=smaug
Comment 7•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5322e59f933e
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Comment 8•5 years ago
|
||
I was meant to document the custom code as a clean-up after bug 1507895 and this is done already 👍
Updated•5 years ago
|
Flags: qe-verify+
Comment 9•5 years ago
|
||
I have reproduced this issue using Firefox 65.0a1 (2018.11.14) on Windows 10 x64.
I can confirm this issue is fixed, I verified using Firefox 65.0b11 on Ubuntu 18.04 x64, Windows 10 x64 and on Mac OS X 10.13.
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
•