From 1eb634dd55967226d70d8dd35fbd6387d9aa7b9b Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Tue, 28 Jan 2014 11:17:44 +0000 Subject: [PATCH] Bug 964576 - fix target is null JS error in Australis' CustomizableUI, r=mikedeboer --HG-- extra : rebase_source : ca5becbaee6af43108454419cf432246988e1ce6 --- browser/components/customizableui/src/CustomizableUI.jsm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/browser/components/customizableui/src/CustomizableUI.jsm b/browser/components/customizableui/src/CustomizableUI.jsm index 7aa3c78536b..699f86aad92 100644 --- a/browser/components/customizableui/src/CustomizableUI.jsm +++ b/browser/components/customizableui/src/CustomizableUI.jsm @@ -1204,6 +1204,11 @@ let CustomizableUIInternal = { let target = aEvent.originalTarget; let panel = this._getPanelForNode(aEvent.currentTarget); + // This can happen in e.g. customize mode. If there's no panel, + // there's clearly nothing for us to close; pretend we're interactive. + if (!panel) { + return true; + } // We keep track of: // whether we're in an input container (text field) let inInput = false;