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