From 454abe7440839d0d932c6f1b951a1125cc72bbd7 Mon Sep 17 00:00:00 2001 From: "flamingice%sourmilk.net" Date: Mon, 25 Sep 2006 01:57:22 +0000 Subject: [PATCH] Bug 353918, No updates available notification does not go away when switching the view, r=rob_strong --- toolkit/mozapps/extensions/content/extensions.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index c4d072844a48..defcb4efc2ba 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -130,7 +130,7 @@ function showMessage(aIconURL, aMessage, aButtonLabel, aButtonAccesskey, if (aButtonLabel) buttons = [new MessageButton(aButtonLabel, aButtonAccesskey, aNotifyData)]; var oldMessage = addonsMsg.getNotificationWithValue(aMessage); - if (oldMessage) + if (oldMessage && oldMessage.parentNode) addonsMsg.removeNotification(oldMessage); if (addonsMsg.currentNotification) gPriorityCount += 0.0001; @@ -498,8 +498,6 @@ function flushDataSource() function noUpdatesDismiss(aEvent) { window.removeEventListener("command", noUpdatesDismiss, true); - if (aEvent.target.localName != "notification") - return; var children = gExtensionsView.children; for (var i = 0; i < children.length; ++i) { @@ -507,6 +505,9 @@ function noUpdatesDismiss(aEvent) if (child.hasAttribute("updateStatus")) child.removeAttribute("updateStatus"); } + + if (aEvent.target.localName != "notification") + document.getElementById("addonsMsg").removeCurrentNotification(); } function setRestartMessage(aItem)