Closed Bug 1466581 Opened 6 years ago Closed 6 years ago

Tab order in popup box lost after bug 1460069

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- unaffected
firefox62 - wontfix
firefox63 --- fixed

People

(Reporter: rontilby, Assigned: smaug)

References

()

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180604100129

Steps to reproduce:

Start Firefox Nightly Browser
in about:config set
dom.webcomponents.customelements.enabled to false
(otherwise the landscape pedigree page on the target web site won't paint)

Login to https://www.familysearch.org  (free account)
Click "Family Tree"
Set your view to "Landscape"
In the "Recents" drop-down click "Add Unconnected Person".
A popup data entry box appears.
Enter some text in the First names field then hit Tab
Enter some text in the Last names field and hit Tab
In the Suffix field, hit Tab
The focus should advance to the "Male" Radio button, but it goes to the "X" in the top right corner of the popup box.

A Mozregression run pointed me to: Bug 1460069 - enable Shadow DOM in Nightly



Actual results:

Pressing the Tab key advances focus to the wrong place.  Pressing the Tab key again appears to do nothing.


Expected results:

The focus should advance to the next field in the popup box.
Blocks: 1460069
Component: Untriaged → DOM
Keywords: regression
Product: Firefox → Core
Assignee: nobody → bugs
Hi, here are the results for mozregression i hope this helps.

INFO: Last good revision: 48a5d87cf9bdb59e39653ab331df04ea2a04267d
INFO: First bad revision: 20d536fd0f2a02bd4527044d367cf98bebbb358d
INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=48a5d87cf9bdb59e39653ab331df04ea2a04267d&tochange=20d536fd0f2a02bd4527044d367cf98bebbb358d
Noting that this is a regression from Shadow DOM work which is only enabled in Nightly. We should watch this for 63 nightly but it won't affect 62 once it becomes beta.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file testcase
Hmm, I thought I had tested cases like this before, but perhaps not.
Priority: -- → P2
Attached patch nested_shadow_tab.diff (obsolete) — Splinter Review
I need to write an automated testcase for this
Attached patch patch + testsSplinter Review
The fix for this bug is to use HostOrSlotTabIndexValue in the sequential focus handling when we're dealing with such elements.

But while writing the testcase, I noticed another bug which had to be fixed at the same time: we can't call item->SetNewTarget(parentTarget); in EventDispatcher if we're dealing with Shadow DOM. Otherwise event.target in ShadowDOM would point to the top most (possibly non-shadow-dom) element, not the deepest one.
Because IgnoreCurrentTarget() is used only in Shadow DOM retargeting, I renamed that one to IgnoreCurrentTargetBecauseOfShadowDOMRetargeting. Long name, but should be clear.

remote: View your change here:
remote:   https://hg.mozilla.org/try/rev/8359209a40624e5ee9e41f0d03eb3517ac183147
remote: 
remote: Follow the progress of your build on Treeherder:
remote:   https://treeherder.mozilla.org/#/jobs?repo=try&revision=8359209a40624e5ee9e41f0d03eb3517ac183147
remote: recorded changegroup in replication log in 0.116s
Attachment #8990121 - Attachment is obsolete: true
Attachment #8990814 - Flags: review?(mrbkap)
Comment on attachment 8990814 [details] [diff] [review]
patch + tests

Review of attachment 8990814 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the explanation of what's going on here.
Attachment #8990814 - Flags: review?(mrbkap) → review+
Pushed by opettay@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0dad5cbc6165
handle sequential focus also in nested shadow DOM, r=mrbkap
https://hg.mozilla.org/mozilla-central/rev/0dad5cbc6165
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
New example of this same issue:
Load the https://www.familysearch.org/ web page.
Sign in (required, but an account is free).
Go to a Family Tree Person Page (for example https://www.familysearch.org/tree/person/M3BB-PWK )
In the "Vitals" section of the page, click "Edit" to the right of "Birth".
In the "Edit Birth" popup, press the <tab> key on your keyboard.
The "X" in the top right corner of the poup gets focus.
Press <tab> again, the Date of Birth gets focus.
Press <tab> again, nothing happens.

This bad behavior is present in 63.0b5 (64-bit) on Windows 10
and in current nightly, but the page works correctly in 62.0
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This bug was fixed. If there is something new, better to open a new bug.
Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Depends on: 1532291
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: