I sometimes want to use the browser search window within topics since the Discourse search function jumps only to posts and not the exact position of the search term. Pressing Ctrl+F works quite well.
However, the Discourse search window doesn’t close automatically when I use the browser’s search function. The first few search results therefore are often within the search window. That’s quite annoying.
Hmm… That may be easier said than done. As by default the keyboard keypress framework that Discourse uses, doesn’t capture keypresses that are made in input boxes (which is why pressing it twice works).
So there is nothing capturing the second pressing of it. And if we did, you’d have us capturing it instead of the browser responding to it… So its a bit of catch-22 here.
@gerhard thanks for clarifying I do find the proposed behavior to be confusing for users as I’m not sure how we can clearly bring across the behavior to users that pressing Ctrl + f twice will first bring up Discourse search and then the browser’s search.
But that is exactly what is happening if you press Ctrl+F in a topic with lots of posts. Try it out yourself by pressing it inside a topic with more than 20 posts.
And it is good that this is happening since I want to be able to search using my browser. It has a better search experience. My problem right now is that the Discourse search window stays visible and I get lots of search results from the browser that are within Discourse’s search results. See my screenshot in the first post.