From 222894e19a4c9956b68e171d89c85bfe23d5b7b5 Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Mon, 9 Jun 2014 10:02:59 +0100 Subject: [PATCH] Bug 979207 - add PanelUI panelshown listener before showing panel, r=mikedeboer --- browser/components/customizableui/content/panelUI.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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;