Address bar suggestions aren't cleared if all other suggestions are disabled
Categories
(Firefox :: Address Bar, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox74 | --- | unaffected |
firefox75 | --- | wontfix |
firefox76 | --- | wontfix |
firefox77 | --- | fixed |
People
(Reporter: mathew.hodson, Assigned: mak)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
- In preferences, disable Top Sites
- Disable Browsing history, Bookmarks, and Other tabs suggestions
- Ctrl+L to select the address bar
- Type something
- Press Ctrl+L and then Delete
Actual results:
Search suggestions are still displayed, and if you press Enter the previous input is searched.
Expected results:
Search suggestions should be cleared and pressing Enter should do nothing.
Reporter | ||
Comment 1•10 months ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Assignee | ||
Comment 3•10 months ago
|
||
it sounds like an unhandled case
Comment 4•10 months ago
|
||
Sounds like a regression from bug 1601052.
Assignee | ||
Comment 5•10 months ago
|
||
Or from when we started opening the panel in bug 1617408. That was not considered originally, so it may be a miss due to the newly added behavior.
Updated•9 months ago
|
Updated•9 months ago
|
Updated•9 months ago
|
Comment 6•9 months ago
|
||
I jumped the gun on assigning myself to this one. The root of this bug is this block in UrlbarInput
, changed in bug 1617408.
The issue is that it checks for !this.openViewOnFocus
, but in the STR, Top Sites are disabled. This bug is fixed by changing that block to
if (!this.view.isOpen) {
this.view.clear();
} else if (
!value &&
(!this.openViewOnFocus ||
!Services.prefs.getBoolPref(
"browser.newtabpage.activity-stream.feeds.topsites",
false
))
) {
this.view.clear();
this.view.close();
return;
}
which essentially checks the same condition as UrlbarProviderTopSites.isActive
.
We haven't landed on what exactly the connection between the openViewOnFocus behaviour, the browser.urlbar.openViewOnFocus
pref, and Top Sites on the New Tab Page should be. We should wait until we have a clear strategy there before fixing this so we don't end up creating another similar regression.
Assignee | ||
Comment 7•9 months ago
•
|
||
I think the problem is a bit more general and architectural here. This happens because when we invoke startQuery, we expect that a result set will arrive, and then we'll update results. This happens to avoid flicker and better support retained results.
But in this case there are no results because Top Sites are disabled, as well as history, bookmarks and tabs. Basically onQueryResults won't be invoked, the view onQueryFinished should remove all the stale rows, but it is _updateResults that sets rows to stale, and _updateResults is invoked by onQueryResults.
Probably the view should mark rows as stale onQueryStarted.
Assignee | ||
Comment 8•9 months ago
|
||
I'm stealing the bug for now, hope you don't mind.
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 9•9 months ago
|
||
Comment 10•9 months ago
|
||
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/697891f0e71a Address bar results aren't cleared if the new query returns no results. r=harry
Comment 11•9 months ago
|
||
bugherder |
Reporter | ||
Comment 12•9 months ago
|
||
I reproduced the issue on the first affected Nightly build from 2020-02-29 on Windows 10.
Verified that results are now cleared. Tested with Nightly 77.0a1 build from 2020-05-01 on Windows 10.
Updated•9 months ago
|
Description
•