Autofilling on focus due to retained results is surprising
Categories
(Firefox :: Address Bar, defect, P3)
Tracking
()
People
(Reporter: adw, Unassigned)
References
(Blocks 1 open bug)
Details
STR
- Enable session restore
- Visit foodnetwork.com
- Open a new tab
- Type "foo", it should autofill to foodnetwork.com
- Hit backspace once to remove the autofilled part
- Optional: Hit Esc once or unfocus the urlbar, which might help to emphasize the problem, i.e., that you quit Firefox with "foo" in the urlbar, not foodnetwork.com
- Restart
- Focus the urlbar
foodnetwork.com is autofilled, which imo is surprising and not desired.
We could fix the call path for this particular case so we pass false for allowAutofill
. However, UrlbarInput.startQuery
defaults allowAutofill
to true, but afaict we only want it to be true when startQuery
is called due to user input. So I think we should fix this by defaulting it to false.
This has been annoying me while working on bug 1398416.
Reporter | ||
Comment 1•5 years ago
|
||
Another simpler way this happens:
- Enable session restore
- Visit foodnetwork.com
- Open a new tab
- Type "foo", it should autofill to foodnetwork.com
- Click outside the urlbar, the input value changes to "foo"
- Click back inside the urlbar, the input value changes to foodnetwork.com with an autofill heuristic result
I think we should respect whatever's in the input. So either:
- We leave foodnetwork.com as the value when you blur or restart with session restore, and then we autofill foodnetwork.com on focus (or just show a visit heuristic, no need for autofill at that point)
- Or we leave "foo" as the value on blur/restore but don't autofill on focus
Either way, we leave what you typed in the input when you focus it.
This is more work than just defaulting allowAutofill
to false, so I'll unassign myself. In particular I ran into browser_retainedResultsOnFocus.js, a very thorough test that made me realize this is more complex than I thought.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
we should pay attention to not regress autofill of retained results when we fix this.
(In reply to Drew Willcoxon :adw from comment #1)
- Visit foodnetwork.com
- Open a new tab
- Type "foo", it should autofill to foodnetwork.com
- Click outside the urlbar, the input value changes to "foo"
- Click back inside the urlbar, the input value changes to foodnetwork.com with an autofill heuristic result
This is the expected effect of retained results, we return to the previous state.
I think we should respect whatever's in the input. So either:
- We leave foodnetwork.com as the value when you blur or restart with session restore, and then we autofill foodnetwork.com on focus (or just show a visit heuristic, no need for autofill at that point)
- Or we leave "foo" as the value on blur/restore but don't autofill on focus
I disagree, the scope of retained results is to restore the previous abandoned search state, if we were autofilling, we should be autofilling.
If we put foodnetwork.com we basically broke user input, I typed foo, I want to continue from there, if instead we remove autofill, the heuristic is broken, so I read foo, press enter and we go to foodnetwork.com instead of searching foo.
Either way, we leave what you typed in the input when you focus it.
We do, the autofilled part can always be backspaced/deleted, as usual.
Comment 3•5 years ago
|
||
Now, I'm not sure why we autofill on session restore, probably it's because we re-query if we have no cache of results.
Comment 4•5 years ago
|
||
I think the real bug here is that we restore results for a session-restored tab. but the only simple fix that comes to my mind is to only restore results if we have those in the cache. Verdi wanted us to restore regardless of having results cache or not.
Description
•