Closed Bug 1575651 Opened 5 years ago Closed 5 years ago

Improve megabar behaviour when ui.popup.disable_autohide is enabled

Categories

(Firefox :: Address Bar, defect, P1)

defect
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 70
Iteration:
70.4 - Aug 19 - Sep 1
Tracking Status
firefox70 --- fixed

People

(Reporter: bugzilla, Assigned: bugzilla)

References

Details

Attachments

(1 file)

When ui.popup.disable_autohide is enabled and the megabar loses and then regains focus, layout is very broken: the toolbar expands to contain the entire megabar. Only clearing the megabar of text fixes this.

Assignee: nobody → htwyford
Status: NEW → ASSIGNED
Iteration: --- → 70.4 - Aug 19 - Sep 1

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

When ui.popup.disable_autohide is enabled and the megabar loses and then regains focus, layout is very broken: the toolbar expands to contain the entire megabar. Only clearing the megabar of text fixes this.

Can you explain how your patch attempts to fix this? I seem to be missing some context.

Flags: needinfo?(htwyford)
Priority: -- → P1

When ui.popup.disable_autohide is enabled, the view can be open but unfocused. This means that the return check in startLayoutBreakout fails since both conditions are not true:

!(
  (this.focused && !this.textbox.classList.contains("hidden-focus")) ||
    this.view.isOpen
)

startLayoutBreakout runs and sets inputRect to be the #urlbar element, which includes the panel. Then on this line:

this._layoutBreakoutPlaceholder.style.height = px(inputRect.height);

height is very tall— as tall as the entire urlbar input+panel. The breakout becomes very tall, breaking layout.

This patch sets inputRect to be the input instead, so the width and height are consistent regardless of whether the input is open or not.

EDIT: The above is not accurate! The issue is actually that the return check in endLayoutBreakout calls this.isOpen instead of this.view.isOpen. Shows me right for making late-night Bugzilla comments :)

Flags: needinfo?(htwyford)
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84f6cbe4a30d
Improve megabar behaviour when ui.popup.disable_autohide is enabled. r=dao
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: