Discourse hijacks ⌘F

I just discovered that I can’t press ⌘F on the page to find raw text anywhere. It gets hijacked by the Search field.

I can empathize with why this was put in, but please change this. It’s a major break change from how ⌘F is supposed to behave in Safari.


I also see it doesn’t do this on every page. I discovered it when I clicked on this link to go the exhaustive enum discussion and tried to search for something.

FWIW: Repeating Cmd+F invokes the built-in search.


I think you already know this, but Discourse updates the DOM as you scroll (a bit like UITableView) by adding/removing items. The browser’s search bar would only find stuff that’s currently in the DOM.

There’s a bug where Command-F doesn’t always search for posts within the current topic:

  1. Open a topic with more than 20 posts (in a new browser tab).
  2. Use the Command-F keyboard shortcut.
    Bug: Notice that the “Search this topic” checkbox isn’t enabled.
  3. Use the Escape key to close the custom search UI.
  4. Use the Command-F keyboard shortcut again.
    Notice that the checkbox is now enabled.

As a workaround, in Safari pressing ⌘F twice should get the browser search to showup.

I think it only does it on threads that have enough posts that they’re not all loaded at once. (in which case the browser’s built in search won’t be able to search the whole thread)

If you really want Safari’s search in that case (e.g., you intentionally only want to search the part of the thread that is loaded) then pressing Command-F twice switches to Safari’s search field.

I think the current behavior is useful as most people probably wouldn’t realize that Safari’s search isn’t necessarily going to find every occurrence of the search string within a thread when there are a lot of posts in a thread.

1 Like

Can’t stand it - webpages should never kidnap native commands.


I appreciate the point about not all the posts being loaded in, but the built-in Discourse search is a poor replacement for a browser search. It doesn’t even default to searching only the current topic, for example.

1 Like

I can't empathize.

1 Like

It actually does, at least for me "Search this topic" is always selected by default.

If that's still an unacceptable behavior, I think an extension like StopTheMadness could help, which allows disabling any hotkey hijacking, and even on per-domain basis, if I remember correctly.

1 Like

This nice little extension does indeed help: no Command-F hijacking for me :-)

Terms of Service

Privacy Policy

Cookie Policy