Closed Bug 1520326 Opened 6 years ago Closed 6 years ago

UrlbarProviderUnifiedComplete should set context.preselected in more cases than it currently does

Categories

(Firefox :: Address Bar, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 66
Tracking Status
firefox66 --- fixed

People

(Reporter: adw, Assigned: adw)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

After implementing bug 1520317, I saw that the preselection doesn't happen in some cases, notably when the heuristic result is a search suggestion. e.g., just type "foo", and the first result isn't preselected. On the other hand, if the first result is an autofill result, then it is preselected.

I think the problem is that UrlbarProviderUnifiedComplete sets context.preselected only if the first result has defaultIndex == 0. That doesn't seem to match how the legacy urlbar works. It doesn't take defaultIndex into account when preselecting the heuristic result, and afaik we don't want to change that behavior in quantumbar.

Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cbfa31396fa4 Set context.preselected when the first result is the heuristic result, regardless of result.defaultIndex. r=mak
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: