Incorrect tab focus after clicking internal link
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| relnote-firefox | --- | 152+ |
| firefox-esr140 | --- | unaffected |
| firefox152 | --- | verified |
| firefox153 | --- | verified |
| firefox154 | --- | verified |
People
(Reporter: jakea, Assigned: ltenenbaum)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-release+
|
Details | Review |
https://random-stuff.jakearchibald.com/bug-repros/fragment-focus/
- Click "click me" - paragraph should highlight
- Press tab to move focus position
The link after the highlighted paragraph should receive focus. In 152 the other link gets focus.
Regressed in: https://hg-edge.mozilla.org/integration/autoland/rev/da409e4fc87748a2e40333b969d4b25eb51aeba3
| Reporter | ||
Comment 1•8 days ago
|
||
Here's the bit of the spec we're missing https://html.spec.whatwg.org/multipage/browsing-the-web.html#scroll-to-the-fragment-identifier:~:text=Move%20the%20sequential%20focus%20navigation%20starting%20point%20to%20target%2E
Chrome, Safari, and Firefox before the regression do the right thing.
Comment 2•8 days ago
|
||
Set release status flags based on info from the regressing bug 2034851
:ltenenbaum, since you are the author of the regressor, bug 2034851, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 3•7 days ago
|
||
Hmm the <a> is blurred after PresShell::GoToAnchor, so even though GoToAnchor sets the selection which clears the starting point, it gets set to the <a> immediately after. But we can fix this by clearing the starting point again after step 6 here. I suspect the reason other browsers don't have this issue is that they are correctly running step 6 before step 7, but we do it out of order intentionally (https://github.com/whatwg/html/issues/7759).
| Assignee | ||
Comment 4•7 days ago
|
||
Updated•7 days ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/60802 for changes under testing/web-platform/tests
Comment 7•7 days ago
|
||
| bugherder | ||
| Assignee | ||
Comment 8•7 days ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D308057
Updated•7 days ago
|
Comment 9•7 days ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: Quite annoying bug with sequential focus navigation (tab/shift+tab)
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: See comment 0 in the bug
- Risk associated with taking this patch: low
- Explanation of risk level: Change is very small and should only affect sequential focus navigation
- String changes made/needed?: N/A
- Is Android affected?: yes
| Assignee | ||
Comment 10•7 days ago
|
||
Putting as wontfix in release for now- if we get lots of reports of this I'm happy to request uplift there too though (the patch is very low-risk).
Upstream PR merged by moz-wptsync-bot
Updated•7 days ago
|
Updated•6 days ago
|
Updated•6 days ago
|
Comment 12•6 days ago
|
||
| uplift | ||
Comment 13•5 days ago
|
||
I have reproduced this issue using Firefox 153.0a1 (build from 2026.05.20) on Windows 11 and macOS 10.15.
I can confirm this issue is fixed, I verified using latest nightly Firefox 154.0a1 and Firefox 153.0b4 (build from treeherder) on Windows 11, macOS 10.15 and Ubuntu 22.
Updated•5 days ago
|
| Reporter | ||
Comment 16•3 days ago
|
||
https://bsky.app/profile/matuzo.at/post/3mpauyxfznc2q
I think we should lift to 152.
Comment 17•1 day ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: Focus navigation (tab/shift+tab) bug. We have received several bug reports about this already (and the patch is very low-risk)
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: yes
- Steps to reproduce for manual QE testing: See comment 0 in the bug
- Risk associated with taking this patch: low
- Explanation of risk level: Very small change, should only affect sequential focus navigation
- String changes made/needed?: N/A
- Is Android affected?: yes
| Assignee | ||
Comment 18•1 day ago
|
||
Original Revision: https://phabricator.services.mozilla.com/D308057
Updated•23 hours ago
|
Updated•23 hours ago
|
Updated•23 hours ago
|
Comment 19•23 hours ago
|
||
| uplift | ||
Comment 21•2 hours ago
|
||
I can confirm this issue is fixed, I verified on Firefox 152.0.4 on Windows 11, macOS 10.15 and Ubuntu 22.
Description
•