Open Bug 1887968 Opened 7 months ago Updated 6 months ago

Fragment + directive-delimited URIs don't function.

Categories

(Core :: DOM: Navigation, defect)

Firefox 123
x86_64
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: zn7esutb, Unassigned, NeedInfo)

References

Details

Component: Untriaged → Address Bar
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

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.

Component: Address Bar → DOM: Navigation
Product: Firefox → Core

Jan, is this a spec-level bug with inline-block or similar as the Chromium issue suggests?

Flags: needinfo?(jjaschke)

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?)

Flags: needinfo?(jjaschke)
Flags: needinfo?(jjaschke)
See Also: → 1890733
You need to log in before you can comment on or make changes to this bug.