← Back to context

Comment by Havoc

3 days ago

Great. Can we do ctrl-f search hijacking next.

So jarring when websites replace core functionality with their own broken crap because they think they’re special.

Some also seem to hijack right click menu now

Firefox allows you to bypass right click hijacking by holding shift before pressing right click.

  • There is also an option in about:config: "dom.event.contextmenu.enabled" set it to false

CTRL+F hijacking is necessary in some cases when apps are not displaying the full text that the user would expect to search. E.g. when there's a 10K-line code file and the UI is not loading the whole thing into DOM, but the user would expect a "find" to search that whole code file.

  • They can have a search button for that, not hijacking default browser functions. Often I want both kinds of search.

  • Browsers can deal with very long documents. Ctrl+F works like a breeze on HTML that's 100K lines long.

    Browsers only struggle to run heavy JS frameworks that wrap every line in a dozens of spans with dozens of handlers and mutate it all on every line scrolled.

This misses the point. Websites are allowed to replace default keyboard shortcuts for a reason. There are only a few exceptions to this, like Ctrl+W. In other words, you can design your website however you want, except to make it more difficult to leave. This is an implementation of the same philosophy.

  • > you can design your website however you want, except to make it more difficult to leave.

    Who decreed that page navigation is in scope and search navigation is outside?