Closed Bug 1583535 Opened 5 years ago Closed 5 years ago

The Megabar should not expand when auto-focused after a panel is closed

Categories

(Firefox :: Address Bar, defect, P2)

defect
Points:
3

Tracking

()

RESOLVED FIXED
Firefox 71
Iteration:
71.3 - Sept 30 - Oct 13
Tracking Status
firefox71 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

If the megabar is expanded, a click on an identity icon or a page action icon will collapse it. Clicking on an icon again will expand it. Continued clicks on icons loop collapse/expansion. This is inconsistent, especially seeing as clicking on these icons when the megabar is collapsed never expands it.

Verdi, could you please clarify what the expected behaviour is here? If the megabar is expanded and an icon is clicked, should the megabar collapse and subsequent icon clicks keep it collapsed? Or should it stay expanded no matter how many icons are clicked? What should happen when icons are clicked when the megabar is collapsed?

Priority: -- → P2
Flags: needinfo?(mverdi)

Currently, if the Urlbar is focused and the user clicks an identity icon, we blur the Urlbar. If the icon is clicked again to hide the doorhanger, we re-focus the Urlbar but at the beginning of the string (not where the cursor was previously). This might be a good opportunity to fix this slightly weird behaviour. For example, we could select the entire string when the identity icon is clicked the second time, instead of putting the cursor at the beginning.

Iteration: --- → 71.3 - Sept 30 - Oct 13
Assignee: nobody → htwyford

(In reply to Harry Twyford [:harry] from comment #0)

Verdi, could you please clarify what the expected behaviour is here? If the megabar is expanded and an icon is clicked, should the megabar collapse and subsequent icon clicks keep it collapsed? Or should it stay expanded no matter how many icons are clicked?

Yes, we should use the "focused and collapsed" state here. The bar should remain that way until the user focuses it again (clicks back inside, uses keyboard shortcut, starts typing a URL, etc.).

What should happen when icons are clicked when the megabar is collapsed?

It should remain in it's current state whether that's "unfocused & collapsed" or "focused and collapsed."

(In reply to Harry Twyford [:harry] from comment #1)

Currently, if the Urlbar is focused and the user clicks an identity icon, we blur the Urlbar. If the icon is clicked again to hide the doorhanger, we re-focus the Urlbar but at the beginning of the string (not where the cursor was previously). This might be a good opportunity to fix this slightly weird behaviour. For example, we could select the entire string when the identity icon is clicked the second time, instead of putting the cursor at the beginning.

Yes, let's do that — select the entire string when the identity icon is clicked the second time.

Flags: needinfo?(mverdi)

I just spoke with Verdi. He clarified that we should enter the Focused & Collapsed state when exiting any panel that results in an Urlbar auto-focus event, not just identity/bookmarks/protections panels.

For example, if the Urlbar is focused and the user opens then closes the Library panel, we should refocus the Urlbar (as we do now) but not expand it. This might require changes higher up the line than UrlbarInput. Maybe setting a flag in the focus handlers in popup.xml?

Summary: Clicks on identity and page action icons are inconsistent with the megabar → The Megabar should not expand when auto-focused after a panel is closed
Attachment #9097772 - Attachment is obsolete: true
Blocks: 1586134
Pushed by htwyford@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8804b063e85a
The Megabar should not expand when auto-focused after a panel is closed. r=dao
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71
Flags: qe-verify+
QA Contact: comorasu.cristian
Flags: qe-verify+ → qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: