From 820ad0464c75f56eeb97ae2f93ce3aad152f92e6 Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Sat, 15 Mar 2014 19:21:36 +0100 Subject: [PATCH] Bug 963143 - Australis - fix nits for download finish notification patch, rs=mak --HG-- extra : rebase_source : dec8b20839abdfccb9429d949b2e20709495ad9d --- browser/components/downloads/content/indicator.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/components/downloads/content/indicator.js b/browser/components/downloads/content/indicator.js index 9cf14130efc9..51db6cece0dd 100644 --- a/browser/components/downloads/content/indicator.js +++ b/browser/components/downloads/content/indicator.js @@ -334,15 +334,17 @@ const DownloadsIndicatorView = { let anchor = DownloadsButton._placeholder; let widgetGroup = CustomizableUI.getWidget("downloads-button"); - let widgetInWindow = widgetGroup.forWindow(window); - if (widgetInWindow.overflowed || widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) { + let widget = widgetGroup.forWindow(window); + if (widget.overflowed || widgetGroup.areaType == CustomizableUI.TYPE_MENU_PANEL) { if (anchor && this._isAncestorPanelOpen(anchor)) { - // If the containing panel is open, don't do anything: + // If the containing panel is open, don't do anything, because the + // notification would appear under the open panel. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=984023 return; } // Otherwise, try to use the anchor of the panel: - anchor = widgetInWindow.anchor; + anchor = widget.anchor; } if (!anchor || !isElementVisible(anchor.parentNode)) { // Our container isn't visible, so can't show the animation: