Open Bug 1766649 Opened 2 years ago Updated 2 years ago

Tab to search engine suggestions only show up after typing then deletion.

Categories

(Firefox :: Address Bar, defect, P5)

defect

Tracking

()

People

(Reporter: mhoye, Unassigned)

References

Details

I just started typing in my address bar, and by leading with “w” got prompted to search on Wikipedia, but: that prompt flashed only briefly and disappeared when I hit the next key. I can get the search-on-Wikipedia prompt back, but only by typing W, then another character, then deleting that second character.

I can reproduce this behavior on both Windows and Linux, and for different search engines - amazon, wikipedia, ddg. I never see them on the first keypress, I only ever see them if I type the appropriate first letter, type more and then delete back to that character. Fast or slow typing or machine doesn't matter, windows/linux doesn't matter.

Strangely, this doesn't happen for Bugzilla - "b" instantly suggests going to Bugzilla without any additional typing. Equally strange, I can see the Wikipedia suggestion if I hit w, space, delete, but also if I make it all the way to "wikip".

Component: Search → Address Bar
See Also: → 1610718
Summary: Search engine suggestions only show up after typing then deletion. → Tab to search earch engine suggestions only show up after typing then deletion.
Summary: Tab to search earch engine suggestions only show up after typing then deletion. → Tab to search engine suggestions only show up after typing then deletion.

So what happens here is that w autofills to www.someotherdomain.com. When this happens we don't show a tab to search entry, because tab-to-search only happens when the typed letters can be autofilled to the domain of a search engine.
when typing w\s (where \s is a space) and then removing the space, we don't autofill, because we never autofill on backspace (it would trap the user in a situation where they potentially may not be able to remove the autofill suggestions if they don't want it). Though, we still provide the tab to search result. This is because wikipedia is "special", its domain is en.wikipedia.org, but the user is unlikely to type e, so we have a special behavior when typing w will still provide a tab to search result to wikipedia.org.

With bugzilla this doesn't happen because typing b is autofilling bugzilla.org that is also the seach engine url domain, so everything is matching.

The implementation is around here: https://searchfox.org/mozilla-central/rev/dc09246dfbfd8dafeb6d55ebee18a6294d525443/browser/components/urlbar/UrlbarProviderTabToSearch.jsm#381-440

Partially the problem here is https://bugzilla.mozilla.org/show_bug.cgi?id=1610718, typing w should not autofill [w]ww..something.... though that may not completely solve the confusion, because of the special handling we give to certain pages using country subdomains like wikipedia.

So, while this is working as intended, it's clearly causing some confusion. We may want to evaluate ways to reduce that confusion, maybe handling backspacing differently, so it won't show tab-to-search like we don't autofill (iirc we have an .allowAutofill property in the context that we could use?).

I think overall this is a low priority due to the complex requirements that only apply to certain engines, but feel free to chime in if you disagree.

Severity: -- → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.