Browser navigation (back/forward) loses the text fragment directive
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox128 | --- | unaffected |
| firefox129 | --- | unaffected |
| firefox130 | --- | disabled |
| firefox131 | --- | verified |
| firefox132 | --- | verified |
People
(Reporter: phorea, Assigned: farre)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details | Review |
Found in
- Nightly 130.0a1
Affected versions
- Nightly 130.0a1
Tested platforms
- Ubuntu 22;
- macOS 14;
- Windows 10;
Affected platforms
- Ubuntu 22;
- macOS 14;
- Windows 10;
Preconditions
- Have dom.text_fragments.enabled to TRUE
Steps to reproduce
- Launch Fx and navigate to https://en.wikipedia.org/wiki/Nuclear_power#:~:text=nuclear
- Click the back button and then the forward button.
Expected result
- The correct text fragment link is displayed in the address bar.
Actual result
- Text fragment link is NOT fully displayed, but the highlight still exists.
Regression range
- Not a regression.
Comment 1•1 year ago
|
||
I'd add that reloading the page after the last step (i.e. returning to the page that originally had the fragment in the URL) magically returns the fragment back for me (today's Nightly with pref), what somewhat explains the highlight.
Note: I have observed that other browsers claiming text fragment (draft) support apply the highlight only on direct navigation in a "fresh" tab (what feels odd): Edge for example keeps the fragment in the URL when doing back+forward or (force)reload, but despite URL fragment is kept displayed in the URL bar, no highlight is produced when returned or reloaded. Only opening new tab with the same URL makes new highlight. (Not sure if it is spec'd/drafted to be this way, but such UX it also suboptimal, IMO.)
| Assignee | ||
Comment 2•1 year ago
|
||
The problem that we're seeing seems to be that when we're coming out of bfcache, we set the current uri of the docshell to the uri of the document. In case of text directives this will be stripped from the document. Tentatively it looks like setting it from session history solves the problem.
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
Comment 9•1 year ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 10•1 year ago
|
||
Comment on attachment 9424668 [details]
Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv!
Beta/Release Uplift Approval Request
- User impact if declined: Confusing experience for users of the scroll to text fragment feature
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: STRs in bug description
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Small and restricted to urls containing text directives
- String changes made/needed:
- Is Android affected?: Yes
| Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment on attachment 9424668 [details]
Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv!
Approved for 131.0b9
Updated•1 year ago
|
Comment 12•1 year ago
|
||
| uplift | ||
Comment 13•1 year ago
|
||
Backed out of beta for causing perma failures
Push failure
Backout link: https://treeherder.mozilla.org/jobs?repo=mozilla-beta&revision=544cf0195dbf1d0692775142e6e56e7ac05d14df
Updated•1 year ago
|
Updated•1 year ago
|
Reproducible on a 2024-07-24 Nightly build on Windows 10.
Verified as fixed on Firefox Nightly 132.0a1 on Windows 10, Ubuntu 22, macOS 14.
The correct text fragment link is displayed in the address bar after navigating back/forward.
| Assignee | ||
Comment 15•1 year ago
|
||
Comment on attachment 9424668 [details]
Bug 1909698 - Use URI from session history when coming out from bfcache. r=peterv!
The test failing is the test included in this patch. I have a fix in 1919704 so we need to uplift that as well to not fail on beta.
Updated•1 year ago
|
Comment 17•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Issue is verified as fixed on Firefox 131.0b9 on Windows 10, Ubuntu 22, macOS 14.
Removing the qa-verify+ flag as the fix was verified in Comment 14 and Comment 18.
Description
•