Options to disable hijack of CMD+F / CTRL+F and "/" keys for search?

We changed it so that ctrl+f triggers Discourse search only when there are more than 20 posts loaded in the current topic stream.

So on smaller topics, this now works like the browser default.

Only on larger topics will you get Discourse search, which is necessary because not all posts are loaded in the DOM (think 100+ replies) at any given time, only the visible ones are.

3 Likes

I find this to be a fairly acceptable compromise, given the technical limitations.

Is there a tutorial feature for Discourse? If there is, or if there are plans for one, maybe notifying the user that if a thread is too large/etc for browser search that it will default to built-in search?

We have heard pretty much zero complaints since we implemented the new “very restricted” we have no choice so we hijack system. Closing.

I did want to expand this now that I have seen some complaints about the restricted implementation.

We hijack when we have no choice.

While reading this post:

  • Hit CTRL-F / CTRL-F - type “universally” … nothing. (except for this post)

  • OK search in topic, post #1 and post #3 have this word.

When you are 40 posts into a topic post #1 and #3 are peeled off the DOM for performance reasons so it would be extremely surprising for it not to be found.

I can think of ways around this issue for say 100 post topics, we could unconditionally keep the text around and only strip off images with a “mini cloak” but then what about 5000 post topics? At some point we just don’t want to force the server to send tons of data you will not be reading down to the browser.

4 Likes

Just press CTRL+F twice if you think you’re smarter than Discourse. Find out if you are :smirk:

1 Like