next up, decide if we want to keep CTRL-F on topic lists. I think we should drop that hijacking cause its really not offering full parity (no highlighting and so on)
You can technically āescapeā the hijack by hitting CTRL+F twice
tested in chrome and firefox
but do be prepare for some bugs (tested on chrome) with native find capabilities
for example you canāt use Enter to go to the next match all the time because it triggered the āquote replyā
which closes the native search.
As an end-user, I gotta say that hijacking native browser search (Cmd+F) is unexpected behavior (aka a ābugā) from my perspective. I can click on the search icon and, if I hadnāt learned to use ā/ā for searching within an application from Gmail and the growing list of webapps that support it, I could learn it from the tooltip on the search button if it included it (e.g., search topics, posts, users or categories ["/"]).
I finally got frustrated enough with the hijacking to search for an option to disable it and discovered this topic. I didnāt realize that I could get the browser search button to work if I pressed it twice. Good to know. At a bare minimum, it might be nice to let people know within the search boxā¦ though it might be hard to fit along the bottom: [] Search this topic (press browser search key [Cmd+F] again to get the expected behavior).
As it stands, my menu is Chrome contains an entry Edit > Find > Find... āF that behaves differently than pressing the indicated āF shortcut. IMHO, this is a side effect of Discourse unnecessarily breaking established conventions.
Pressing CTRL (or CMD) + F twice to āescapeā the Discourse search is a bit of a kludge because having focus on an input field disables standard keyboard shortcuts.
Technically, such a feature would be a wart, but it has been argued before that it is actually a miswart. The reason being that due to the infinite scroll mechanic, a large portion of the topic may not actually be available to the browser, so the browserās built-in Ctrl+F cannot work correctly.
Oh, thereās no misunderstanding from me on that. I absolutely get the reasons as to why itās a good idea. The thing is, to me (and others, I suspect), the CTRL/CMD+F search paradigm is not about to change on the rest of the internet, so until Discourse proves the rest of the internet should change to follow their suit, then Iād prefer if the functionality was not forcefully hijacked. Thatās really all. My personal preference would be to use an alternative shortcut like ā/ā (which now works, btw) and leave CTRL/CMD+F alone. Keyboard shortcuts have always been a āpower userā thing anyway, so I donāt see this benefiting the average user as it is.
Yeah, youāre right, I too would prefer Ctrl+F to work as usual. In hindsight I guess I came across a bit strong, but I had been leafing through the jargon file (itās history for nerds; awesome history) and couldnāt help but shove that wart comment in there.
couldnāt agree more. Iām not sure why, but I donāt find the ctrl+f hijacking in google docs a problem, but it really irks me in discourse. I guess this is because gdocs mimics and extends the browser search with highlighting, [x] of [y] results and up/down arrows. If discourse was able to do this I think it would be less annoying.
Personally I want to only enable the hijacking on the topic page, and not on topic lists like we have now, @codinghorror I really think this should be reconsidered, cause I actually use ātraditionalā search on the other pages and we perform no unloading so there is not technical issue with enabling it.
That said ā¦ about the topic page ā¦
I 100% support hijacking of CTRL-F on topic pages. What would we call this user preference?
āEnable extremely buggy browser search on topic pageā
CTRL-F on topic pages is a trainwreck, open a composer hit CTRL-F its just totally messed up. As soon as you scroll to the spot it has highlighted it replaceState kicks in and clears the search results. Besides DOM unloading in larger topics which makes it simply look broken.
So, instead. I 100% support PRs to improve our in-topic search, perhaps oneās that mimic more of built-in one (like scrolling to highlighted spot and dealing with multiple matches in one post and so on.
I also very much think we should stop hijacking in all other spots.
Thatās a really really good point. I think this may be exactly why the Discourse implementation bothers me too.
This is very reasonable. I hope others will be able to help with this, because my ruby skills are next to non-existent (and I havenāt had much time to learn, or I would be doing so).
I use Ctrl+F extensively to navigate topic lists on our (vBulletin) forum, and anticipate I will want to do the same after we move to Discourse, so Iām very much with @sam on this.
If the hijacking is to remain within a topic - and I fully understand the arguments in favour of that - could the shortcut menu please be annotated to indicate this?
I first discovered the hijacking yesterday when I pressed Ctrl+F, started to type and then realised I had somehow opened the Discourse search box by mistake. So I closed it and tried again, with (of course) the same result. Long years of experience with poor co-ordination has taught me that when unexpected things happen, itās because Iāve hit the wrong keys by mistake, so I made a third attempt, carefully ensuring I got the intended keys, and only the intended keys. Still the search box opened. So I double-checked that I hadnāt accidentally activated Caps Lock, or any of the other things Iāve been known to do, but no. I checked the keyboard shortcut menu to see if something had changed, but it still showed the search shortcut as ā/ā. At this stage, I then chose to open Discourse search, and discovered this and the related thread.
A brief note in the shortcut menu would have alerted me to this from the start and saved both time and frustration on my part.
Press CTRL+F twice to get the browser native search. Warning: results can be bad on topic pages because stuff is unloaded from the browser DOM as you scroll.
If thatās a reply to my post, youāre missing the point. I was simply asking that the shortcut menu be amended to indicate that Ctrl+F will open the Discourse search from within a topic, to save the confusion folk like myself experience when things donāt work as expected.