diff --git a/browser/components/customizableui/content/panelUI.js b/browser/components/customizableui/content/panelUI.js index 9097db9ba85..e779ecb537a 100644 --- a/browser/components/customizableui/content/panelUI.js +++ b/browser/components/customizableui/content/panelUI.js @@ -149,10 +149,6 @@ const PanelUI = { } else { anchor = aEvent.target; } - let iconAnchor = - document.getAnonymousElementByAttribute(anchor, "class", - "toolbarbutton-icon"); - this.panel.openPopup(iconAnchor || anchor); this.panel.addEventListener("popupshown", function onPopupShown() { this.removeEventListener("popupshown", onPopupShown); @@ -162,6 +158,11 @@ const PanelUI = { gCustomizationTabPreloader.ensurePreloading(); deferred.resolve(); }); + + let iconAnchor = + document.getAnonymousElementByAttribute(anchor, "class", + "toolbarbutton-icon"); + this.panel.openPopup(iconAnchor || anchor); }); return deferred.promise;