When focus returns to search box, auto highlight all text

They do when you’re using chrome (Crtl + F), inbox and gmail. Could be “scale” thing, they feel like you’re going to refine web searches more than searches to your personal data.

How about making the behavior different depending on if the search is launched using a keyboard shortcut (highlight) versus clicking on the icon (no highlight). Or at least clearing the previous search terms out after awhile.

Our Discourse instance is multi purpose and at least 80% of the time, when I search, I want to perform a new search, not refine a search that I might have performed a few hours ago. When I return to google.com after running a search, it doesn’t have the same search term listed there that I had hours ago, but Discourse seems to hang onto the search term idefintiely.

gmail does not exhibit this behavior, if I search for something and then click the search box cursor shows up.

This is so super bikesheddy to me, why is double clicking the text box so hard?

If you use the “/” shortcut it highlights (at least on Chrome + Mac).

I guess I view search workflows as more important that what color the bikeshed is, but I could be an outlier. Searching is a primary function for me with any system that contains buckets of text.

Because you launched the search using the keyboard shortcut.

not following, our / also highlights?

My #1 objection here is for “click” on INPUT to unconditionally highlight text. Its odd and very uncommon.

There are so many other quirks that need to be fixed first and so many other features that need to be fixed.

For example, if you are on full page search and hit / we pop up the search window, which is odd, you are already in a search page, it should go to the INPUT that is visible on the page.

In fact even showing the magnifying glass when you are on full page search is weird.

Fine for increasing usability, but want to focus on stuff that is uncontroversial first.

1 Like

It doesn’t on build v1.4.0.beta10 +300; but if it does now, I’m fine with that. Auto-highlight on mouse click is not that important to me, auto-highlight on keyboard shortcut was my biggest pain point.

Sure, that is why I posted to ux instead of feature. I assumed ux discussions got a lower priority in the dev cycle.

Icic no wonder you didn’t remove the code for that. I’m fine with highlight on click being removed too. It wasn’t too much of a pain.

I amended the behavior of search in the full page search

If on the full page search

  • When you click on header magnifying glass we simply highlight the search term in the full page search box

  • When you hit / we highlight the search term for full page search

Effectively this means there is just one way of searching when you are on Search results for '' - Discourse Meta , which in my books is good :sunflower:

https://github.com/discourse/discourse/commit/086d31d53b4902238ec9e10207c219402e6437b4

4 Likes

Did a regression occur here at some point? The search term highlighting no longer seems to work for me on my latest local build or here on meta.

2 Likes

Aha this is probably a regression we missed in earlier vdom changes @sam

3 Likes

We should fix this @eviltrout

1 Like

Fixed in
https://github.com/discourse/discourse/commit/e619af3eeeb73fe7a28505c39d5c20eb8d86c3db

4 Likes