Closed
Bug 995841
Opened 10 years ago
Closed 10 years ago
toolbaritem added to menu panel cannot be accessed by addon until after user manually opens menu panel
Categories
(Firefox :: Toolbars and Customization, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 941903
People
(Reporter: trevorhemail-mozbug, Unassigned)
Details
Steps to reproduce: 1. Add a toolbaritem to the menu panel either with CustomizableUI.addWidgetToArea or manually. 2. Restart Firefox 3. In Addon code trying to reference the toolbaritem with document.getElementById is not possible 4. Click to open the menu panel 5. In Addon code trying to reference the toolbaritem with document.getElementById is now possible This behavior is different to adding to other areas that are not visible.
Comment 1•10 years ago
|
||
You can use CustomizableUI.getWidget(yourWidgetId).forWindow(window).node to workaround. This is always available. You can check whether the widget is in "some area" rather than in the palette by checking if CustomizableUI.getPlacementOfWidget(yourWidgetId) returns an object or null. We've tried to fix the panel case in the past, but the performance characteristics are bad, and so we haven't.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•