Open Bug 1586134 Opened 5 years ago Updated 4 years ago

Suboptimal focus behavior when clicking on address bar buttons

Categories

(Firefox :: Address Bar, defect, P5)

71 Branch
defect

Tracking

()

Tracking Status
firefox71 --- affected

People

(Reporter: valflaux, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

On a new profile (with megabar enabled):

  1. browse to any website (e.g. https://www.mozilla.org/en-US/)
  2. click on the urlbar
  3. click on the "Enhanced Tracking Protection" (shield) button
  4. click on the "Site Identity" (lock) button
  5. click on the "Bookmarks" (star) button
  6. click on the "Pocket" button
  7. click on the urlbar
  8. click on the urlbar menu (· · ·)

Actual results:

  1. the urlbar get the focus
  2. the "Enhanced Tracking Protection" window is opened and the urlbar lose the focus
  3. the "Enhanced Tracking Protection" window is close, the "Site Identity" window is opened and the urlbar get the focus again
  4. the "Site Identity" window is closed, the "Bookmarks" window is opened and the urlbar loose the focus
  5. the "Bookmarks" window is closed, the "Pocket" window is opened and the urlbar get the focus and loose it instantly
  6. the "Pocket" window is closed and the urlbar get the focus
  7. the urlbar menu is opened and the urlbar keep the focus

Expected results:

The urlbar should not gain focus when a window / menu opened from an urlbar button is still present.

Component: Untriaged → Address Bar
Depends on: urlbar-update-1
No longer depends on: urlbar-update-1
Depends on: 1583535
Priority: -- → P3

Okarin, do you still see problems in Nightly?

Harry, do you think there's something left to do here after bug 1583535?

Flags: needinfo?(valflaux+github)
Flags: needinfo?(htwyford)

While bug 1583535 fixed the expansion issue, there's a bit more work to do with the focus states. Switching between panels directly, such as clicking on the ETP icon immediately followed by the identity icon unfocuses the bar for the ETP click, then refocuses the bar on the identity icon click.

We should probably suppress focus if we're in a popupshowing event. This would cover blurring the bar when panels are initially focused (which we already do) and not focusing the bar if we're switching between panels directly.

Flags: needinfo?(htwyford)

That doesn't seem megabar-specific though. It also feels increasingly like an edge-case, so we might want to downgrade this to P5 or just wontfix it.

No longer blocks: urlbar-update-1
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(valflaux+github)
Priority: P3 → --
Summary: [megabar] inconsistent focus behavior when clicking on buttons → Suboptimal focus behavior when clicking on address bar buttons

Yes, that behaviour existed pre-megabar. I agree that it's a pretty low priority, but something worth fixing eventually. I think P5 is appropriate.

Priority: -- → P5

When I try this now, the urlbar retains focus/selection when I click the shield and lock icons but not the bookmarks star.

Severity: normal → S4
You need to log in before you can comment on or make changes to this bug.