Focus seems broken when `overflow` is set in native Shadow DOM
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox65 | --- | wontfix |
firefox66 | --- | wontfix |
firefox67 | --- | fixed |
People
(Reporter: wes_ngrongsen, Assigned: edgar)
References
(Blocks 1 open bug)
Details
(Keywords: regression)
Attachments
(5 files)
I verified this issue on Windows 10 x64 with the latest Firefox release version 64.0.2 (64-bit), Firefox Nightly 66.0a1 (2019-01-10) (64-bit) and I cannot reproduce it.
Can you please test this in safe mode? Here is a link that can help you: https://goo.gl/AR5o9d.
If you still have the issue please create a new profile, you have the steps here: https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles?redirectlocale=en-US&redirectslug=Managing-profiles#w_starting-the-profile-manager
Also, can you please create a videoscreen capture when you can and if you have time? To be sure that we understand the same steps to reproduce this issue.
Reporter | ||
Comment 2•6 years ago
|
||
Daniel, I've recorded a simple video to demonstrate the issue at https://youtu.be/qettFyfY3Fs.
From the video, you can see that focus never moves to the button below the overflow content as I was tabbing thru.
Reporter | ||
Comment 3•6 years ago
|
||
Also, I was running Firefox Nightly 66 with the latest update on Windows x64 (with latest update too) in safe mode while recording. Hope this helps in the investigation.
Comment 4•6 years ago
|
||
Thanks a lot for the testcase and for the report!
Reproduced the issue on Firefox Nightly 67, Beta 66 and Release 65 on Windows 10 x64
Mozzregression also revealed that this is a regression caused by shadowDOM:
Last good revision: 1879856ca1ab0def40038be7482a9bc2e140cfee
First bad revision: 2718c0bfff1d6e9cf07e28212cf7d1dd5b09485e
Regression introduced by: Bug 1490820
Olli, can you please take a look at it? Not sure if other bug reports highlighted this regression or not.
Reporter | ||
Comment 5•6 years ago
|
||
Thanks for updating this bug report. Good to hear that the bug has been verified and confirmed as a regression.
Comment 6•6 years ago
|
||
:wchen, could you look in to this given Olli's backlog?
Comment 7•6 years ago
|
||
I flagged :wchen as the reviewer of another patch for shadow DOM that mentioned focus (bug 1079236).
wchen isn't actively around.
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Jared, can we find another owner for this bug and prioritize it with regards to our upcoming releases? Is that something we want to fix before the next ESR or can it remain in the backlog until we have cycles to fix it? Thanks
Comment 10•6 years ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #9)
Jared, can we find another owner for this bug and prioritize it with regards to our upcoming releases? Is that something we want to fix before the next ESR or can it remain in the backlog until we have cycles to fix it? Thanks
I believe Edgar is able to provide inputs here. :)
Assignee | ||
Comment 11•6 years ago
|
||
reduced test script.
Assignee | ||
Comment 12•6 years ago
|
||
So the issue here is that nsIFrame::IsFocusable returns true with tabIndex = 0 for a scrollable frame [1], so we could move foucus on it. But in [2], we just get tabIndex from the content which returns -1 in this case, then we could not able to find next tabbable content correctly.
[1] https://searchfox.org/mozilla-central/rev/9eb30227b21e0aa40d51d9f9b08bb0b113c5fadb/layout/generic/nsFrame.cpp#9529-9530
[2] https://searchfox.org/mozilla-central/rev/9eb30227b21e0aa40d51d9f9b08bb0b113c5fadb/dom/base/nsFocusManager.cpp#3147-3151
Assignee | ||
Comment 13•6 years ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #9)
Jared, can we find another owner for this bug and prioritize it with regards to our upcoming releases? Is that something we want to fix before the next ESR or can it remain in the backlog until we have cycles to fix it? Thanks
I think fixing this is not something complicated, we could try to fix this before next ESR (68).
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 14•6 years ago
|
||
Found another case that Shift+Tab doesn't work as expected when 'overflow' is set on slot element.
Steps to reproduce:
- Click input text has blue border to move focus on it.
- Press Shift+Tab
Actual result:
The focus moves to input text with value=3.
Expect result:
The focus should move to input text with value=4.
Comment hidden (obsolete) |
Assignee | ||
Comment 16•6 years ago
|
||
Assignee | ||
Comment 17•6 years ago
|
||
This is for the scrollable frame, because nsIFrame::IsFocusable of a scrollable
frame returns true with tabIndex = 0 even if the content has no tabIndex
attribute.
Assignee | ||
Comment 18•6 years ago
|
||
The mIndexInInserted keeps pointing to the last assigned node of a slot parent
when we are at the end of child list. So when we calles GetPreviousChild when we
are at the end of child list, ExplicitChildIterator will skip last assigned node.
Assignee | ||
Comment 19•6 years ago
|
||
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dfeedf139126
https://hg.mozilla.org/mozilla-central/rev/db9ccc4f8c6e
https://hg.mozilla.org/mozilla-central/rev/8a65241e7c3d
Reporter | ||
Comment 22•6 years ago
|
||
Awesome! Thank you for the great work.
Comment 23•6 years ago
|
||
Is this something which should be nominated for Beta approval or can it ride the trains?
Updated•6 years ago
|
Updated•6 years ago
|
Description
•