Remove overriding of cmd/ctrl-f

How to recreate:

  1. Use major browsers (chromium derivatives / ffx / ie)
  2. browse the internet
  3. become accustomed to using standard keyboard commands like cmd-q, cmd-1/2/3, cmd-f
  4. continue browsing
  5. encounter a discourse website
  6. press cmd-f because you want to find something on the page
  7. get an entirely different experience that is generally worse*
  8. throw computer out the window. abandon life on the internet as it is. move to desert island and eat sushi for a hot minute

Examples of “worse”

  • frequently doesn’t actually find things on the page
  • requires a minimum number of characters
  • doesn’t allow repeat presses of cmd-f to cycle and search

Proposed Solution:
Remove the functionality in its entirety.

3 Likes

I’m not sure this is a bug, per se.

Perhaps rather a suggestion?

1 Like

I dunno… if I were on a discourse website and wanted to click in the URL bar and it didn’t work, wouldn’t that be a “bug”

How is this any different?

2 Likes

You can type a second control-f to get to the browser search. It’s the best key to use for search. Do you have a better idea?

3 Likes

yes yes. better solution:
press cmd-f once. (as in, not twice) (also, to preempt any other ideas: not three or more times either)

this is paraphrased from the original post as:

“Remove the functionality in its entirety.“

2 Likes

The irony that this particular instance of discourse must have disabled this feature is not lost. Have the powers that be around here recognized its inferiority?

Maybe the topic you tried on was short

2 Likes

See, this is the bug:

" most of the post and topic stream is not in the browser DOM"

Maybe stop loading some much javascript, css and pretty images and focus on loading the text of the conversation.

Then native cmd-f would work just fine.

“twice if you think you’re smarter than Discourse. Find out if you are”

Literally every time I just scroll down the page real fast to load all the crap up. Then press cmd-f twice and it works better.

This is not true.

Feature exists here as well:

Go to: Introducing experimental admin sidebar navigation - #61 by martin hit ctrl-f

1 Like

When you do this, to improve scrolling & rendering performance, Discourse removes earlier posts from the DOM. So it is impossible to ‘load all’ of a large topic.

That’s why we have the custom ctrl+f implementation, and we only use it for long topics which are impossible to load in their entirety.

7 Likes

Seems to me like you’re just making excuses. Hijacking native functionality should be a hard no. 99.9% of sites on the internet respect this. Why is discourse special?

1 Like

There’s a huge amount of history on this subject in lots of topics over the years. If you have a search you’ll be able to see the past conversations. :+1:

4 Likes

GitHub, Google docs/slides/etc. hijack it as well, and I suspect it’s good for performance here, and is why it’s done.

2 Likes

GitHub, Google docs/slides/etc. hijack it as well, and I suspect it’s good for performance here, and is why it’s done.

Excellent opportunity for discourse to be a leader in not-clobbering-native-functionality!

You could point fingers at the big guys and show em who’s boss.

What keystroke would you recommend for people who expect control-F to find the post they are looking for in the topic when that post isn’t available in the browser. It would seem like what you would expect is for control-F to find the post you want in that topic, but that’s not what you want. What’s the “find the post in this topic even if my browser can’t find it” key? Isn’t having control-f not find a post in the current topic a violation of expectations?

3 Likes

Overriding standard browser functions with Discourse’s search feature can be jarring and unintuitive for users who expect consistent shortcuts across websites. It disrupts their flow and hampers accessibility, making on-page searches harder.

A better approach might be allowing users to choose their preferred search method, by default preserving browser functions. Suggest a visual icon to convey search within Discourse to start.

I think Ctrl-F is the standard ‘find text in page’ functionality of the browser which I think is better not to override.

For discourse specific searches, people can click on the magnifying glass (probably for most users who don’t use shortcuts). Discourse already has the ‘/’ shortcut for those that use shortcuts.

Interestingly, on my Chromebook it hijacks both ctrl-alt-f and / for this functionality.

If you override, at a minimum include some text like ‘press ctrl-f again to use native find in page function’.

1 Like

Unsure when it changed, but Discourse no longer seems to hijack Ctrl + F, only Ctrl + Alt + F as mentioned in @Isambard’s post.

Doh, missed the bit about large topics:

It does tell you about hitting again for default search @Isambard:
image

1 Like

Thanks for pointing that out, I did not even notice that after using Discourse for years.

Kidding aside, I value what the developers are doing but I hope they can embrace changes to make Discourse more accessible to mainstream users.

Not here for some reason: