From 0d8fc081423b9865441e7f5bce495512ab6740e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Sun, 24 Jun 2012 22:30:59 +0200 Subject: [PATCH] Bug 767813 - Set the consumeoutsideclicks attribute on panels instead of calling popupBoxObject.setConsumeRollupEvent. r=enndeakin --- browser/base/content/browser-places.js | 3 --- browser/base/content/browser.js | 4 ---- browser/base/content/browser.xul | 2 ++ browser/components/downloads/content/downloads.js | 4 ---- browser/components/downloads/content/downloadsOverlay.xul | 1 + 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 85243945f05b..4c64afe7992e 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -187,9 +187,6 @@ var StarUI = { this._itemId = aItemId !== undefined ? aItemId : this._itemId; this.beginBatch(); - // Consume dismiss clicks, see bug 400924 - this.panel.popupBoxObject - .setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME); this.panel.openPopup(aAnchorElement, aPosition); gEditItemOverlay.initPanel(this._itemId, diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 39a327513311..6774d561f67f 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6707,10 +6707,6 @@ var gIdentityHandler = { // the popup is actually needed this._identityPopup.hidden = false; - // Tell the popup to consume dismiss clicks, to avoid bug 395314 - this._identityPopup.popupBoxObject - .setConsumeRollupEvent(Ci.nsIPopupBoxObject.ROLLUP_CONSUME); - // Update the popup strings this.setPopupMessages(this._identityBox.className); diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index 6aa60d071b95..577f930b9873 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -137,6 +137,7 @@ footertype="promobox" orient="vertical" ignorekeys="true" + consumeoutsideclicks="true" hidden="true" onpopupshown="StarUI.panelShown(event);" aria-labelledby="editBookmarkPanelTitle"> @@ -259,6 +260,7 @@ type="arrow" hidden="true" noautofocus="true" + consumeoutsideclicks="true" onpopupshown="gIdentityHandler.onPopupShown(event);" level="top"> diff --git a/browser/components/downloads/content/downloads.js b/browser/components/downloads/content/downloads.js index e0dabd0f9cab..cca869e71e61 100644 --- a/browser/components/downloads/content/downloads.js +++ b/browser/components/downloads/content/downloads.js @@ -302,10 +302,6 @@ const DownloadsPanel = { return; } - // Make sure that clicking outside the popup cannot reopen it accidentally. - this.panel.popupBoxObject.setConsumeRollupEvent(Ci.nsIPopupBoxObject - .ROLLUP_CONSUME); - // Ensure the anchor is visible. If that is not possible, show the panel // anchored to the top area of the window, near the default anchor position. DownloadsButton.getAnchor(function DP_OPIDR_callback(aAnchor) { diff --git a/browser/components/downloads/content/downloadsOverlay.xul b/browser/components/downloads/content/downloadsOverlay.xul index 1fb487e93c6c..ae45da58de3a 100644 --- a/browser/components/downloads/content/downloadsOverlay.xul +++ b/browser/components/downloads/content/downloadsOverlay.xul @@ -46,6 +46,7 @@ type="arrow" orient="vertical" level="top" + consumeoutsideclicks="true" onpopupshown="DownloadsPanel.onPopupShown(event);" onpopuphidden="DownloadsPanel.onPopupHidden(event);">