Closed
Bug 1512457
Opened 6 years ago
Closed 6 years ago
Fix various cases that focus navigation doesn't work well with frameless shadow host
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
(Blocks 1 open bug)
Details
Attachments
(6 files, 1 obsolete file)
(deleted),
text/html
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
Bug 1512457 - Part 3: Ensure GetNextTabbableContentInScope returns only elements which have a frame;
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
No description provided.
Comment 1•6 years ago
|
||
(I wouldn't be very surprised if display: contents; causes issues in focus handling even without Shadow DOM.)
Assignee | ||
Comment 2•6 years ago
|
||
If you append elements after host, then it works well. It looks like we do not handle some corner case well.
Updated•6 years ago
|
Priority: -- → P2
Assignee | ||
Comment 3•6 years ago
|
||
Something wrong in the test case, upload a correct version.
Attachment #9029830 -
Attachment is obsolete: true
Assignee | ||
Comment 4•6 years ago
|
||
Assignee: nobody → echen
Assignee | ||
Comment 5•6 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #3)
> Created attachment 9030665 [details]
> test_bug1512457.html
It is caused by light DOM traversing in https://searchfox.org/mozilla-central/rev/fd32b3a6fa3eff1468311f6fcf32b45c117136df/dom/base/nsFocusManager.cpp#3232-3248, in this case, we redirect iterStartContent to aRootContent, and start search from aRootContent again, but we should move focus to the urlbar, like https://searchfox.org/mozilla-central/rev/fd32b3a6fa3eff1468311f6fcf32b45c117136df/dom/base/nsFocusManager.cpp#3492-3506 did.
And I found another issue, light DOM traversing would skip the element that have no frame, however it could be a shadow host with "display: contents", we should check the shadow tree scope instead.
Assignee | ||
Comment 6•6 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #5)
> And I found another issue, light DOM traversing would skip the element that
> have no frame, however it could be a shadow host with "display: contents",
> we should check the shadow tree scope instead.
Attach test case for this.
(focus doesn't move to 'shadowinput2' when focus is on 'shadowinput1' and press Tab)
Assignee | ||
Comment 7•6 years ago
|
||
(In reply to Edgar Chen [:edgar] from comment #6)
> Created attachment 9031368 [details]
> test_bug1512457_2.html
Found another issue: when focus is on 'shadowinput1' or 'shadowinput1' and then press Shift+Tab, focus doesn't move.
Assignee | ||
Comment 8•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Summary: Tab does not take focus out from Shadow DOM if the host is the last element and "display: contents" → Fix various cases that focus navigation doesn't work well with frameless shadow host
Assignee | ||
Comment 9•6 years ago
|
||
In this case we should look for next highest tabindex or do end searching
handling, instead of just check the root content.
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
Assignee | ||
Comment 13•6 years ago
|
||
Updated•6 years ago
|
Attachment #9032178 -
Attachment description: Bug 1512457 - Part 3: Ensure GetNextTabbableContentInScope returns a focusable content at frame level; → Bug 1512457 - Part 3: Ensure GetNextTabbableContentInScope returns only elements which have a frame;
Comment 14•6 years ago
|
||
Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/132b45eb718f
Part 1: Correctly handle the case that FocusManager could not find next content has frame in tree; r=smaug
https://hg.mozilla.org/integration/autoland/rev/243f3dd33bfb
Part 2: Enter into frameless shadow host scope during tree traversal; r=smaug
https://hg.mozilla.org/integration/autoland/rev/ebeac4ea403b
Part 3: Ensure GetNextTabbableContentInScope returns only elements which have a frame; r=smaug
https://hg.mozilla.org/integration/autoland/rev/84b78ae21626
Part 4: Add more tests for frameless shadow host; r=smaug
Comment 15•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/132b45eb718f
https://hg.mozilla.org/mozilla-central/rev/243f3dd33bfb
https://hg.mozilla.org/mozilla-central/rev/ebeac4ea403b
https://hg.mozilla.org/mozilla-central/rev/84b78ae21626
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Updated•6 years ago
|
Type: enhancement → defect
You need to log in
before you can comment on or make changes to this bug.
Description
•