Closed Bug 1631177 Opened 6 years ago Closed 6 years ago

address bar keyboard shortcuts do not disable search

Categories

(Firefox :: Address Bar, enhancement)

75 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: dfogni+mozilla, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Steps to reproduce:

Type '*' in the address bar to search for a bookmark (or any other shortcut described here: https://support.mozilla.org/en-US/kb/address-bar-keyboard-shortcuts)

Actual results:

The first entry is still "search with google", even if I explicitly requested to search only in the bookmarks.

Expected results:

search mode is disabled (no search with ... buttons), the first match is selected and can be navigated to with just the enter key.

Compare to what happens when you type '?': the address bar switches to search mode and no result from the browser history is displayed

Component: Untriaged → Address Bar

(In reply to dfogni+mozilla from comment #0)

search mode is disabled (no search with ... buttons), the first match is selected and can be navigated to with just the enter key.

The first result is not a real result, it is what we call an "heuristic", it just tells you "hey, if you press Enter this is what will happen". You can think of it as an hint. It is preselected so that you can just move DOWN once to reach results.
As such, we still show "Search for '*'" because that's what happens when you Enter on '*', what else could happen? that char has no other meaning.

Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID

(In reply to Marco Bonardo [:mak] from comment #1)

(In reply to dfogni+mozilla from comment #0)

search mode is disabled (no search with ... buttons), the first match is selected and can be navigated to with just the enter key.

The first result is not a real result, it is what we call an "heuristic", it just tells you "hey, if you press Enter this is what will happen". You can think of it as an hint. It is preselected so that you can just move DOWN once to reach results.
As such, we still show "Search for '*'" because that's what happens when you Enter on '*', what else could happen? that char has no other meaning.

The highlight is no way a preselection, there is no other way to interact with the bar using the keyboard (and even clicking on the arrow with the mouse just brings me to the first result). Moving down brings me to the second result

what do you mean '*' has no other meaning?
It is obviously a special character, here the snip from the documentation (https://support.mozilla.org/en-US/kb/address-bar-keyboard-shortcuts):

typing in special characters after each search term, separated by spaces, in the address bar will filter your results.

You have just to add…
[...]

  • to search for matches in your bookmarks.

If I ask for matches in the bookmarks I do mean that I don't care for "search for ...". Proposing something that does not match as the first result is the worst heuristic ever.

You point about the empty '*'+enter match shows even more how inconsistent it is: if I type a search shortcut (or '?' for the default search) it gets eaten away and pressing enter searches for the empty string in the search engine.

Why should search shortcuts behave differently than the other shortcuts?
With 'g firefox[enter]' or '? firefox[enter]' I get results for firefox on google (the first hit is not to search for 'g firefox' in google) why should '* firefox[enter]' look for '* firefox' on google?

let me be clear, if we remove the search with entry, Enter on '*' will still do a search. that's how the urlbar works.
What should * do otherwise when you search for it?

It could very well open the best boomark according to the other heuristics.

And there is no surprise because I see it before typing enter. Nobody is going to blindly type '' enter and expect to look for '' in google.

Again, 'g' + enter does not search for 'g' on google. And 'g' is just another form of address bar shortcut

nobody would expect typing *+Enter goes to an unpredictable bookmark... Sure we could show a url but people tend to do use muscle memory. We go for a least surprise tactic.
And yes, people search for "*something", developers for example looking for info about C pointers...

The least surprise is when behaviour is consistent across all features.

The address bar if full of surprises. There is no way to rely on muscle memory because you need to read the results, and move down at least once if you did not want to use the search engine (which is almost every time, otherwise I would have used Ctrl+K).

'?something' googles for 'something'
'something' googles for 'something'
'
something' googles for '
something'
'g something' googles for 'something'

'?' is removed immediately by the search. '*' needs a space after it to trigger.

'? something' has no way find a bookmark with title '? something' because the heuristic result list has been replaced with a single 'search with ...'

You need to log in before you can comment on or make changes to this bug.