Autofill should be restored after the heuristic result is re-selected
Categories
(Firefox :: Address Bar, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(1 file)
In the awesomebar, if the heuristic result is autofilled, and then you press the down arrow key to select the next result and then press up to re-select the heuristic result, the autofilled value is autofilled again, including restoring the autofill selection.
In the quantumbar, after you press the up arrow key to re-select the heuristic result, the full URL is put in the input instead, and there's no selection.
Assignee | ||
Comment 1•5 years ago
|
||
We should replace the context.autofillValue property with a result.autofill property. When the view selects results, it already notifies the input about it by calling input.setValueFromResult(). So we can modify setValueFromResult to check for the presence of result.autofill and thereby get autofill "for free". (The one place where the view doesn't call input.setValueFromResult() when a result is selected is when it selects the preselected result, so this patch adds that.)
result.autofill is an object: { value, selectionStart, selectionEnd }
This is going to help me implement bug 1521702.
One potentially cool thing about doing autofill this way is that any result can now trigger autofill, not only the heuristic result, and do it easily. Of course the user isn't typing when they select a non-heuristic result, so it's probably not fair to call that "autofill", but the result can trigger the selection aspect of autofill. As one example, that might be interesting for search suggestions: Type "foo", key down to the "foobar" suggestion, and the "bar" substring is automatically selected.
Updated•5 years ago
|
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f89acdbfa432 Replace context.autofillValue with result.autofill, and autofill results when they're selected. r=mak
Comment 3•5 years ago
|
||
Backed out for bc failures on browser_urlbar_locationchange_urlbar_edit_dos.js.
Backout link: https://hg.mozilla.org/integration/autoland/rev/754a16bede85e57a216f5b22440615a4982c1e60
Push link: https://hg.mozilla.org/integration/autoland/rev/f89acdbfa4327376e9787ed18443cb468c543e10
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=226550379&repo=autoland&lineNumber=3223
Assignee | ||
Comment 4•5 years ago
|
||
I just noticed this patch breaks search alias autofill too.
Pushed by dwillcoxon@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e37833d71cd1 Replace context.autofillValue with result.autofill, and autofill results when they're selected. r=mak
Comment 6•5 years ago
|
||
bugherder |
Description
•