Closed Bug 1628557 Opened 5 years ago Closed 5 years ago

Address bar suggestions aren't cleared if all other suggestions are disabled

Categories

(Firefox :: Address Bar, defect, P2)

75 Branch
defect
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 77
Iteration:
77.2 - Apr 20 - May 3
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:

  1. In preferences, disable Top Sites
  2. Disable Browsing history, Bookmarks, and Other tabs suggestions
  3. Ctrl+L to select the address bar
  4. Type something
  5. 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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Address Bar

it sounds like an unhandled case

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2

Sounds like a regression from bug 1601052.

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.

Regressed by: 1617408
Blocks: 1630275
No longer blocks: urlbar-update-1
Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 77.1 - Apr 6 - Apr 19
Points: --- → 2

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.

Iteration: 77.1 - Apr 6 - Apr 19 → ---
Depends on: 1627858

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.

No longer depends on: 1627858

I'm stealing the bug for now, hope you don't mind.

Assignee: htwyford → mak
Iteration: --- → 77.2 - Apr 20 - May 3
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
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 77
No longer regressed by: 1601052
Has Regression Range: --- → yes

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.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: