Closed Bug 1582022 Opened 4 months ago Closed 4 months ago

The one-off search buttons are selected too soon when tips are in the results list

Categories

(Firefox :: Address Bar, defect, P2)

defect
Points:
2

Tracking

()

VERIFIED FIXED
Firefox 71
Iteration:
71.2 - Sept 16 - 29
Tracking Status
firefox71 --- verified

People

(Reporter: adw, Assigned: harry)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If the tip is the last result in the popup (e.g. the only result), you key down to select the tip's main button, and then key down again to select the help button, both the help button and the first one-off become selected. I haven't tried to debug it, but it looks like the problem is that we pass in this.view.visibleRowCount here: https://searchfox.org/mozilla-central/rev/1d0e84d2ec2843924bc6e5ed6658f93439e12351/browser/components/urlbar/UrlbarController.jsm#287

The one-offs use that to determine when the selection moves from the last result to the one-offs. visibleRowCount is one less than the actual number of selectable elements, so the one-offs think they become selected one selectable element too early.

We should update the tip test for this.

Changing the summary to more accurately reflect the problem.

Summary: When the tip is the last result, both the help button and first one-off search button become selected when keying down → The one-off search buttons are selected too soon when tips are in the results list

The one-offs compare view.visibleRowCount to view.selectedRowIndex, so not only do we need a view.visibleElementCount, we also need a view.selectedElementIndex.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 71.2 - Sept 16 - 29
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a3d13728cbc
Update search one-offs selection behaviour to respect selectable elements in the view instead of rows. r=adw
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Flags: qe-verify+
Flags: needinfo?(cristian.comorasu)
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(cristian.comorasu)
You need to log in before you can comment on or make changes to this bug.