Closed
Bug 575218
Opened 14 years ago
Closed 14 years ago
Bookmarks button position is not updated on startup on Mac
Categories
(Firefox :: Bookmarks & History, defect)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 4.0b1
People
(Reporter: mak, Assigned: mak)
References
Details
Attachments
(1 file, 1 obsolete file)
788 bytes,
patch
|
Gavin
:
review+
dao
:
review-
|
Details | Diff | Splinter Review |
This is due to the fact the button checks for isElementVisible("personal-bookmarks") and finds its size is 0 because bookmarks toolbar is inited just later.
On other platforms personal-bookmarks has a min-height that makes this working even if bookmarks toolbar has not been inited.
Assignee | ||
Comment 1•14 years ago
|
||
So, possibilities:
- move min-height in pinstripe (Actually min-height in pinstripe is set on #PersonalToolbar rather than on #personal-bookmarks like in other themes)
- move toolbar initialization to BrowserStartup (but this would delay ui showing, that is for sure an unwanted effect)
- move back BMB.init() to delayed startup, just ensure that it runs before sessionstore is inited.
Assignee | ||
Comment 2•14 years ago
|
||
doing 3 would most likely mean users will see the button move on startup.
So I'd go for the simplest solution that is 1.
Assignee | ||
Comment 3•14 years ago
|
||
looks like on Mac also width is 0, I'd say that dropping a new bookmark on an empty toolbar is pretty hard there!
Assignee | ||
Comment 4•14 years ago
|
||
And 0 width is also reason for bug 575194, when element is moved to menubar flex=1 does not make it take up available space. We either need to set a min-width on all platforms, or a more robust way to detect if element is visible. And figure out why flex=1 on Mac does not work as expected.
Comment 5•14 years ago
|
||
(In reply to comment #3)
> looks like on Mac also width is 0
Not for me. Only the height is 0 over here.
> I'd say that dropping a new bookmark on an
> empty toolbar is pretty hard there!
Indeed!
(In reply to comment #1)
> So, possibilities:
> - move min-height in pinstripe
Sounds good to me. Do we also need a min-height on #PlacesToolbar, i.e. the hbox inside #personal-bookmarks? Without it, dropping a bookmark on an empty bookmarks toolbar doesn't work for me.
Comment 6•14 years ago
|
||
(In reply to comment #5)
> (In reply to comment #3)
> > looks like on Mac also width is 0
>
> Not for me. Only the height is 0 over here.
Oh, you're probably talking about the state before bookmarks bar initialization, right? Don't know about that.
Assignee | ||
Comment 7•14 years ago
|
||
(In reply to comment #6)
> (In reply to comment #5)
> Oh, you're probably talking about the state before bookmarks bar
> initialization, right? Don't know about that.
yes, you can also try wit ha profile with no bookmarks in the bar, it should still be possible to drop a new bookmark there.
Assignee | ||
Comment 8•14 years ago
|
||
(In reply to comment #5)
> Sounds good to me. Do we also need a min-height on #PlacesToolbar, i.e. the
yes, it's probably better to only set it on #PlacesToolbar in all themes, places-bookmarks will inherit it.
Still on Mac before toolbar is initialized I find bo.width = 0, while with the min-height fix height is now correct
Assignee | ||
Comment 9•14 years ago
|
||
or something like this, since the height changes based on theme, but the fact internal hbox should inherit it is related to functionality and should not be something themes can play with.
Assignee | ||
Comment 10•14 years ago
|
||
note: the above does not fix the 0-width issue still.
Assignee | ||
Comment 11•14 years ago
|
||
using a different check solves both the problems, isElementVisible is a but bogus for our case, not only on Mac but also on Windows if you move the bookmarks item to the menubar and the menubar has autohide, the width ends up being zero when the menubar is hidden.
Attachment #454537 -
Flags: review?(dao)
Assignee | ||
Updated•14 years ago
|
Attachment #454508 -
Flags: review?(dao)
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Updated•14 years ago
|
Attachment #454537 -
Flags: review?(dao) → review+
Assignee | ||
Comment 12•14 years ago
|
||
different visibility check
http://hg.mozilla.org/mozilla-central/rev/e6055b0ebd2a
will move the other patch to another bug.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3.7b1
Assignee | ||
Updated•14 years ago
|
Attachment #454508 -
Attachment is obsolete: true
Attachment #454508 -
Flags: review?(dao)
Comment 13•14 years ago
|
||
Comment on attachment 454537 [details] [diff] [review]
different visibility check
(In reply to comment #11)
> Created an attachment (id=454537) [details]
> different visibility check
>
> using a different check solves both the problems, isElementVisible is a but
> bogus for our case, not only on Mac but also on Windows if you move the
> bookmarks item to the menubar and the menubar has autohide, the width ends up
> being zero when the menubar is hidden.
This is intentional. If the bookmarks toolbar stuff is hidden in the menu bar, the button needs to be present in the nav bar.
Attachment #454537 -
Flags: review-
Assignee | ||
Comment 14•14 years ago
|
||
(In reply to comment #13)
> This is intentional. If the bookmarks toolbar stuff is hidden in the menu bar,
> the button needs to be present in the nav bar.
it did not work reliably bringing to the button to appear sometimes and not appear other times, even with that expectation. The width was sometimes evaluated to 0 even if the element was visible and in place.
we can evaluate a better fix after the freeze, it was was just appearing not consistent across windows (plus causing this weird Mac issue)
Assignee | ||
Comment 15•14 years ago
|
||
filed Bug 575437 to handle the edge case in a better way that does not regress pinstripe.
Assignee | ||
Comment 16•14 years ago
|
||
To clarify, in some window I was seeing the button even if menu was not hidden.
Updated•14 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•