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•5 years ago
|
||
Comment 2•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Assignee | ||
Comment 3•5 years ago
|
||
it sounds like an unhandled case
Comment 4•5 years ago
|
||
Sounds like a regression from bug 1601052.
Assignee | ||
Comment 5•5 years 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•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 6•5 years 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•5 years 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•5 years ago
|
||
I'm stealing the bug for now, hope you don't mind.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Reporter | ||
Comment 12•5 years 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•5 years ago
|
Description
•