46 comments

  • RedShift1 2 hours ago

    Sidenote: please don't hijack CTRL+F on webpages, thanks. Sincerely, the world.

    • dspillett 43 minutes ago

      [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 2 hours ago

      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 an hour ago

        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 an hour ago

      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.

    • TrianguloY 2 hours ago

      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 an hour ago

      And `/` neither, while you're at it (I'm looking at you, GitHub).

      • SushiHippie an hour ago

        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 30 minutes ago

          But even then I shouldn't need to do it for every website that does this.

      • rty32 41 minutes ago

        Found the vimmer

        • mmcdermott 30 minutes ago

          True, but `/` is also a shortcut for quick find in Firefox.

          • homebrewer 12 minutes ago

            And ' searches through the links only. Find a link, press enter (or shift+enter) and you don't have to touch the mouse or install vimium and friends.

        • klez 31 minutes ago

          Indeed :)

  • jiri 42 minutes ago

    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.

  • dveeden2 an hour ago

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

    https://addons.mozilla.org/firefox/addon/text-fragment/

    • extraduder_ire 39 minutes ago

      Support for the feature itself was only added in a very recent mainline firefox release. Like, less than one or two months ago.

    • RamRodification 42 minutes ago

      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

  • fbn79 40 minutes ago

    In Google Chrome select text, right click and click "copy link to highlight". It create a link with ~:text=

  • al_borland an hour ago

    Every time I run across this I think about how useful it is, then forget it exists and never actually use it.

  • rkta an hour ago

    > 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.

  • andai 38 minutes ago

    I've noticed that Google inserts this into result links sometimes, taking you to the relevant part of the page.

  • JodieBenitez an hour ago
  • polotics 2 hours ago

    Very nice! Hopefully Firefox developers have the bandwidth to implement this as well, and not let Google Chrome have this feature as an "embrace and extend" differentiator. As for MS-Edge, well I guess it must be funny for Microsoft to see they're getting a taste of their own sweet old medicine...

    • arp242 2 hours ago

      It was added to Firefox in 131, released a few weeks ago: https://www.mozilla.org/en-US/firefox/131.0/releasenotes/

      And "add useful UX features that people want" is not "EEE", especially when there's a standard doc and test suite for it.

    • rzzzt 2 hours ago

      Edge does have a "Copy link to highlight" option in its context menu.

    • jeroenhd 2 hours ago

      This feature seems to work on Firefox as far as I can tell. It used to be one of those Chrome APIs, but now every browser but Safari seems to support them completely. I'm sure the Safari team can quickly implement the last bit of Javascript API when they get the opportunity to.

      • amiga386 2 hours ago

        The feature "seems to work on Firefox" if you're using the version of Firefox released 10 days ago [0]

        It's not implemented in Firefox ESR and won't be until June 2025 [1]

        [0] https://caniuse.com/url-scroll-to-text-fragment

        [1] https://whattrainisitnow.com/calendar/

        • nanna 2 hours ago

          Which is to say, that it work on Firefox.

          • amiga386 an hour ago

            I'm running Firefox right now. It doesn't work. I use Firefox ESR version. Many people do. Many people have also not installed updates released a mere 10 days ago.

            Be honest and admit that full, reliable support for this feature among all the main browsers is not going to be there until at least next year.

            • master-lincoln an hour ago

              What? It is there already in Firefox latest version. Do you mean it will take that long until the majority of users have it?

              If you decide to not update or use a version that is updated less often, that is not the fault of the people working on the software.

              Be honest and admit that you are knowingly using a Firefox version that gets major updates only every 52 weeks and still complain about not getting a released feature.

              • amiga386 an hour ago

                I'm not complaining. What I'm trying to highlight is, as it says on the caniuse.com page, this feature has "Limited availability across major browsers", and that is to be expected and accepted.

                If you're thinking of promoting use of this non-standard feature, consider how many people it _doesn't_ work for, rather than thinking "oh and yes even Firefox (asoftendaysagoandonlythedesktopmainlinereleasenottheesrormobileversion) so I'll rush out and proseletyze this amazing feature that clearly everyone can use"

                • master-lincoln 16 minutes ago

                  Is there an alternative? Do users with browser that don't have support have a worse experience when these links are used? I thought no...

              • JimDabell an hour ago

                > If you decide to not update

                Browser support isn’t about what version you personally decide to run, it’s about what version your users are running. What Firefox ESR supports is the relevant factor here.

                > Be honest and admit

                Can you make your point without accusing people of dishonesty?

                • master-lincoln 11 minutes ago

                  > Can you make your point without accusing people of dishonesty?

                  I was just returning the favor to amiga386 to make them see this is not a normal form of communication. They lead with

                  > Be honest and admit that full, reliable support for this feature among all the main browsers is not going to be there until at least next year.

                  When I think they meant to say support for most users isn't there until next year. Because all major browsers have support already now in the current version.

                  • JimDabell 6 minutes ago

                    > When I think they meant to say support for most users isn't there until next year.

                    They did say that though:

                    > full, reliable support

                    “Reliable” in the context of browser support means widely supported in the browser versions people actually use – i.e. web developers can rely upon it being there. Something that is only available in a browser version released last week is not “reliable” in the sense of browser support.

    • milliams 2 hours ago

      It works just fine on Firefox. The things that seems to be Chrome-only is the "select some text, right click to get direct link" bit, and the "link to text that is hidden".

    • newswasboring 2 hours ago

      > As for MS-Edge, well I guess it must be funny for Microsoft to see they're getting a taste of their own sweet old medicine...

      Can you elaborate on this a bit?

      • reportgunner an hour ago

        Something with internet explorer but I'm not old enough to know what exactly.

  • srcnkcl 2 hours ago

    I always wished something to point at typos in websites... thanks for that

  • _giorgio_ 30 minutes ago

    Can you disable it in firefox?

    shift+i -> "permissions" -> disable "override keyboard shortcuts"

  • pbiggar 34 minutes ago

    I use these for footnotes, eg in [1] which had a lot of footnotes. Ghost and other blogs don't support footnoting well afaict. Sometimes I miss restructured text, which did this quite well, markdown alas does not.

    [1] https://blog.paulbiggar.com/i-cant-sleep/

  • dakiol an hour ago

    Is it just me or whenever I open a link with a text fragment, the page is loaded just fine but it takes one or two seconds to actually scroll down to the highlighted text?

    Usually in Chrome and when visiting sites that are not 100% pure text (e.g., bloated Confluence docs)

  • westurner 2 hours ago

    Is there a specified / supported way to include other parameters in the URI fragment if the fragment part of the URI starts with :~:text=?

      https://example.com/page.html#:~:text=[prefix-,]textStart[,textEnd][,-suffix]
      https://example.com/page.html#:~:text=...
      https://example.com/page.html#:~:text=...&param2=two&:~:param3=three
    
    w3c/web-annotation#442: "Selector JSON to IRI/URI Mapping: supporting compound fragments so that SPAs work" (2019): https://github.com/w3c/web-annotation/issues/442

    WICG/scroll-to-text-fragment#4: "Integration with W3C Web Annotations" (2019): https://github.com/WICG/scroll-to-text-fragment/issues/4#iss...