Megabar should be regular width when a new window is opened
Categories
(Firefox :: Address Bar, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: bugzilla, Assigned: dao)
References
Details
Attachments
(2 files)
Currently, the Megabar is very narrow on first run and when new windows are opened. It should be the same width it is on any other page.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
I think this issue stems from some circular logic when it comes to setting width. startLayoutBreakout
sets the width of the expanded megabar based on the width of the textbox. The width of the selected textbox is based on --urlbar-width
.
The issue is that the Urlbar is already selected by the time startLayoutBreakout
is called, leading to the circle. The CSS first can't find --urlbar-width
so it sets width to some minimum width (on my machine, it's 235px). Then startLayoutBreakout
sets --urlbar-width
to that minimum width, since that's how big the textbox is in its current selected state. Sure enough, modifying this line to
width: calc(var(--urlbar-width, 700px) + 2 * @urlbarBreakoutExtend@);
means the focused Urlbar is 700px on new window opens instead of 235px.
Dao, do you know of some way we can defer the focus-on-new-window behaviour until after startLayoutBreakout
can be called? That way, --urlbar-width
will be correctly set to the width of the full (unfocused) Urlbar. Alternatively, do you know where the call to focus the Urlbar on a new window is, so we could set --urlbar-width
just before?
Comment 2•5 years ago
|
||
I ran into this myself (with browser.urlbar.megabar = true
), and was about to file a dupe. Here's a screencast I recorded, showing the bug.
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Pushed by dgottwald@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7ddf38b4b44c Fix initial megabar size in new windows. r=harry
Comment 5•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Description
•