Smarter Than 'Ctrl+F': Linking Directly to Web Page Content
56 comments
·October 25, 2024RedShift1
dspillett
[for those just reading the comments having not read TFA: it isn't talking about changing default find behaviour within a page, but the feature to specify text to scroll to and highlight within a link URL so the user doesn't need to ctrl-F when you refer to a small part of a larger page]
jeroenhd
Sometimes they "need" to, because rather than load 100kB of text, they'll chunk 100kB of text over ten JSON requests and searching requires backend intervention. If you make every web page an app, the browser doesn't work right anymore so you force yourself to build a browser within a browser!
0xTJ
Even if it's for that, it's infuriating, and a terrible pattern. Just as I expect CTRL+click to open in a new tab, there are some interactions that should be left alone; it's annoying to me that they even can be overridden.
throw101010
Small tip, and I know it doesn't make it much better, but in few cases I've seen this done (Discourse is the main culprit and it's widely used) pressing Ctrl+F a second time will go to the normal browser "Search in this page" function. Still annoying, but manageable.
amadeuspagel
Please don't hijack HN threads with unrelated gripes about the modern the web and please don't pretend to speak for the world.
RedShift1
Unrelated? CTRL+F is literally in the title...
arusahni
Hijacking CTRL+K sucks, too! It's the shortcut used to focus the browser search input in Firefox, but the industry has seemingly decided it's a great way to launch a command palette.
TrianguloY
I've seen that on pages with text editors that don't load all the text or where search is expanded with more features, like for example on Github.
In these cases I usually click outside the editor and then control+f works as usual.
If not, you can also try F3, and if that's hijacked too browsers usually have a shortcut to "find in page" in the hamburguer/three-dots menu
klez
And `/` neither, while you're at it (I'm looking at you, GitHub).
SushiHippie
They have a (broken) setting under the accessibility settings which disables all the character key hijacking.
https://github.com/settings/accessibility
But for whatever reason this only seems to work temporarily (if it is already toggled off for you, you need to enable it again, save preferences, then toggle it off, and save preferences) and then it does not hijack '/' for a few minutes.
klez
But even then I shouldn't need to do it for every website that does this.
rty32
Found the vimmer
mmcdermott
True, but `/` is also a shortcut for quick find in Firefox.
klez
Indeed :)
amadeuspagel
I wonder whether it was a mistake to separate this feature from a standard selection.
I don't know how to design it separately. The default is that selections are blue and fragments are purple, but if you choose different colors for both, in line with your color scheme, how will people know which is which? I guess you can still choose different tones of blue and purple.
Why shouldn't selecting text automatically update the address?
fbn79
In Google Chrome select text, right click and click "copy link to highlight". It create a link with ~:text=
hk1337
It’s really cool but it seems rather convoluted for the typical user. We should perhaps start making good use of the ID attribute and linking to that first before we start trying to use ~:text=
orr94
Using text fragments is particularly useful when you don't control the page you're linking to and it doesn't have a good anchor to link to.
jiri
It would be nice to have similar feature like this, but to highlight rectangle (instead of text) on the page to focus viewer on some specific area. I send screenshots with highlight quite often.
bandie91
or every document on the web may have hierarchical semantic structure, so you can link/refer to a heading in any depth. eg #1 → first chapter; #1.2 → first chapter second heading; #1.2.1 → first chapter second heading first paragraph; #1.2.1.5 → first chapter second heading first paragraph 5th sentence. it won't neccessary be chapter-heading-paragraph-sentence 4-fold structure - just wanted to illustrate in conventional language -, but any level of structure.
…why not put a css-selector in the link?
al_borland
Every time I run across this I think about how useful it is, then forget it exists and never actually use it.
dveeden2
With a addon this is much more usable, not sure why there isn't a selection-to-text-fragment-link functionality builtin to Firefox...(same for other browsers?)
extraduder_ire
Support for the feature itself was only added in a very recent mainline firefox release. Like, less than one or two months ago.
RamRodification
According to the post
> If you’re using Chrome, simply highlight some text, right-click, and you’ll find the “Copy link to highlight” option in the context menu
andai
I've noticed that Google inserts this into result links sometimes, taking you to the relevant part of the page.
rkta
> Text fragments are currently supported in all the browsers.
All meaning all the browsers listed in the linked table. These may be the major browsers, but not all of them.
vanviegen
Brave has this feature disable due to (rather minor, imho) privacy concerns.
srcnkcl
I always wished something to point at typos in websites... thanks for that
null
Sidenote: please don't hijack CTRL+F on webpages, thanks. Sincerely, the world.