Closed Bug 711508 Opened 8 years ago Closed 8 years ago

Toolbox.externalToolbars duplicated if the toolbar contains a menubar with autoHide enabled.

Categories

(Toolkit :: Toolbars and Toolbar Customization, defect)

x86_64
All
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: mconley, Assigned: mconley)

References

Details

Attachments

(1 file)

Thunderbird contains it's main menubar within a toolbar, and when autoHide is toggled, it looks like, for some reason or another, the constructor is recalled on that toolbar.

This causes the toolbox to have the same toolbar re-added as an external toolbar.
Attached patch Patch v1Splinter Review
This patch simply ensures that the external toolbar does not already exist in the toolbox before adding itself to the externalToolbars collection.
Assignee: nobody → mconley
Attachment #582300 - Flags: review?(enndeakin)
Blocks: tb-tabsontop
Neil:

You're my local XUL go-to guy - but let me know if you want me to redirect the review.

-Mike
Comment on attachment 582300 [details] [diff] [review]
Patch v1

Are you removing the toolbar from the document when autohide is toggled?

It looks like the toolbox getter doesn't handle being removed as it caches the _toolbox value, even though it could have changed by being moved somewhere else.
Attachment #582300 - Flags: review?(enndeakin) → review+
Neil:

No, we're just toggling the collapsed attribute.  Not sure why the constructor is called when we collapse and uncollapse though...

-Mike
Pushed to mozilla-inbound as https://hg.mozilla.org/integration/mozilla-inbound/rev/6c49a8d46f7d
Target Milestone: --- → mozilla11
https://hg.mozilla.org/mozilla-central/rev/6c49a8d46f7d
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: XUL → Toolbars and Toolbar Customization
Product: Core → Toolkit
QA Contact: xptoolkit.widgets → toolbars
You need to log in before you can comment on or make changes to this bug.