Fragment + directive-delimited URIs don't function.
Categories
(Core :: DOM: Navigation, defect)
Tracking
()
People
(Reporter: zn7esutb, Unassigned, NeedInfo)
References
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0
Steps to reproduce:
As https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/100#issue-2206951863 explains, using https://addons.mozilla.org/firefox/downloads/file/3969185/link_to_text_fragment-2.3.2.xpi on https://download.opensuse.org/repositories/openSUSE:/Factory/standard/x86_64/MozillaFirefox-123.0.1-1.1.x86_64.rpm, I tried to get https://wiki.archlinux.org/index.php?title=Steam/Troubleshooting&oldid=804434#Debugging_Steam:~:text=%24-,debugger%3Dgdb%20steam,-gdb%20will%20open to work.
Actual results:
https://wiki.archlinux.org/index.php?title=Steam/Troubleshooting&oldid=804434#Debugging_Steam:~:text=%24-,debugger%3Dgdb%20steam,-gdb%20will%20open doesn't take me to https://wiki.archlinux.org/index.php?title=Steam/Troubleshooting&oldid=804434#Debugging_Steam, nor does it highlight https://wiki.archlinux.org/index.php?title=Steam/Troubleshooting&oldid=804434#:~:text=%24-,debugger%3Dgdb%20steam%20,-gdb%20will%20open.
Subsequent investigation in https://github.com/GoogleChromeLabs/link-to-text-fragment/issues/100#issuecomment-2019848938 caused https://issues.chromium.org/issues/331237013 to be filed, and I was directed to file this consequently.
Expected results:
I should have been directed to the correct heading, with the text specified in the URI highlighted.
Reporter | ||
Updated•7 months ago
|
Reporter | ||
Updated•7 months ago
|
Comment 1•7 months ago
|
||
Does it work if you click the URL, or only when entering it in the address bar? We think it is most likely a core issue, but if it happens only when entering in the address bar, please feel free to move back to the address bar component.
Jan, is this a spec-level bug with inline-block
or similar as the Chromium issue suggests?
Comment 3•6 months ago
|
||
There's several things to point out here.
First off, just yesterday we (peterv, farre, avandolder, me) tried to figure out under what circumstances this extension actually works, as the review section on AMO as well as the Github issues page indicates that this extension hasn't been working properly for years. We suspect the extension depends on a service worker that might not be running (or is stopped, killed, crashed...), but it could as well be something else. Overall, we got the extension to work correctly in maybe 1 out of 10 cases. (the same link would work only on some machines, only on some occasions, only once, ...)
Actually, I have filed Bug 1890733 yesterday to "fix" this case (the URL contains both a fragment and a text directive), so that while Text Fragments is not enabled yet the fragment directive would be stripped from the URL and the fragment remains. This would allow the fragment navigation, which is intended as a fallback (thus providing a better user experience than just not scrolling at all). Implementing this would benefit everyone who does encounter such a link and doesn't have an extension which allows highlighting a text fragment. However it would break the extension though. Given that there's this bug and also a comment in Bug 1890733, I might hold off landing that for now, hoping that we can ship Text Fragments soon.
However, with dom.text_fragments.enabled=true
, clicking the link mentioned above does scroll to the fragment, but does not highlight the search text. The link that doesn't contain a fragment (only the fragment directive) doesn't scroll at all.
The issue here (from looking very briefly) seems to be the percent-encoded =
sign in the start
token of the text directive. If that is removed, the
Clicking on the following link with text fragments enabled scrolls and highlights correctly (minus half of the targeted text, of course): https://wiki.archlinux.org/index.php?title=Steam/Troubleshooting&oldid=804434#Debugging_Steam:~:text=gdb%20steam,-gdb%20will%20open
FWIW, this link won't work in Chrome Canary, it scrolls but doesn't highlight, so it seems that Chrome also can't process the text directive.
I'll investigate this further. Thanks for reporting!
(keeping the NI?)
Updated•6 months ago
|
Updated•6 months ago
|
Reporter | ||
Comment 4•6 months ago
|
||
Indeed, standard8@mozilla.com, it doesn't work as a URI rendered by https://mermaid.live/edit#pako:eNolj0FugzAQRa-CpqLZEIgSFpUVUlXiBsmuriqDB9uKsZEZC6ooPXuddDYz_8_bvBv0XiIwGKxfei0CZZeWuyzNxyeHo8h0wKHZaKJpZlW1mKspRei1NS6upQ-qMk7iWk56eidDFpszoRirS_Cxszhr78k49eqtNLJ529X1oX5psYtKpfr7CbNfRrhSk-_rbSGfPwz5oVWyy_e7-YEU2_-wGGvT8hO6zYlwpmMlThy-oIARwyiMTC63hwAH0jgiB5ZOKcKVA3f3xIlI_vzjemAUIhYQJykIWyNUECOwQdgZ73-AtV9J either, so I think it's a core bug.
Reporter | ||
Updated•6 months ago
|
Description
•