Closed Bug 1658330 Opened 1 year ago Closed 1 year ago

Results aren't re-queried when exiting search mode with the empty string

Categories

(Firefox :: Address Bar, defect, P1)

defect
Points:
2

Tracking

()

VERIFIED FIXED
81 Branch
Iteration:
81.2 - Aug 10 - Aug 23
Tracking Status
firefox81 --- verified

People

(Reporter: harry, Assigned: adw)

References

Details

Attachments

(1 file)

[STR]

  1. Enable the update2 prefs (browser.urlbar.update2, browser.urlbar.update2.localOneOffs, and browser.urlbar.update2.oneOffsRefresh)
  2. Click in to the Urlbar to show Top Sites.
  3. Enter search mode by clicking a one off. There should be no typed query. A heuristic search result should be shown.
  4. Press backspace to exit search mode.

[Expected]
Top Sites are shown again.

[Actual]
Results don't change.

This is a recent regression, probably from bug 1654862.

Assignee: nobody → adw
Status: NEW → ASSIGNED
Iteration: --- → 81.2 - Aug 10 - Aug 23

I'm not sure this ever worked right. I ran mozregression, and before bug 1647915, all the top sites remain in the view throughout the entire interaction, including after you hit backspace. After that bug, when you click an engine, only the pinned Amazon search top site remains, and it remains after you hit backspace.

According to the first section in the InVision, it looks like the view is supposed to become empty when you click a one-off from the top-sites view. So the proper behavior is:

  1. Click in urlbar
  2. Show top sites with one-offs
  3. Click one-off
  4. Enter search mode, view becomes empty
  5. Backspace
  6. Exit search mode, view shows top sites again

So before bug 1647915, the top sites were shown after backspacing as this bug describes, but it seems like it wasn't intentional because they never went anywhere. Therefore I don't think this is a regression after all, and I'll remove that keyword. Let me know if you disagree.

Keywords: regression
No longer regressed by: 1654862
Summary: Regression: results aren't re-queried when exiting search mode with the empty string → Results aren't re-queried when exiting search mode with the empty string

We just need to start a new query on backspace, even when the input is empty.

I noticed that unlike backspace, clicking the close button will always start a
new query except when the view is closed. That means the close button was
already doing the right thing. It also means that the close button will not open
the view and show top sites when the view is already closed; however, with this
patch, backspace will open the view and show top sites if the view is closed.
That seems right to me despite the inconsistency since inputs in the urlbar
(including backspace) always cause the view to open.

Other changes:

  • Make the click_close test task more similar to the backspace task: Open
    the view both with and without a string instead of only with a string
  • Some calls in the test didn't have an await like they should (maybe the
    source of reported intermittent failures?)
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/427683ea28ac
Start a new query to show top sites when the input is empty and search mode is exited by backspacing. r=harry
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

I verified this issue using 82.0a1 (2020-09-14) on macOS 10.13 and Windows 10 x64.
Adrian could you help me with Ubuntu verification?

Flags: needinfo?(adrian.florinescu)

Verified as fixed using Firefox 81.0 RC build (with update2 prefs flipped) and latest Nightly 82.0a1 2020-09-17 under Ubuntu 18.04 64-bit.

Status: RESOLVED → VERIFIED
Flags: needinfo?(adrian.florinescu)
You need to log in before you can comment on or make changes to this bug.