Only display permission prompts when they are anchored to the right icon (bug 1296252) draft
authorPanos Astithas <past@mozilla.com>
Thu, 18 Aug 2016 14:20:30 +0300
changeset 412602 186b3fb067944e82dd7277500483c34b3f9efc19
parent 405011 4e5c752c3663f3dc5b63bb0328e2eb066526193e
child 412603 f43196b4036b0951116dbeab9200dccf3b2f8f6e
push id29216
push userbmo:jhofmann@mozilla.com
push dateMon, 12 Sep 2016 12:30:23 +0000
bugs1296252
milestone51.0a1
Only display permission prompts when they are anchored to the right icon (bug 1296252) MozReview-Commit-ID: JqY9sCfoxGo
toolkit/modules/PopupNotifications.jsm
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -725,16 +725,20 @@ PopupNotifications.prototype = {
       popupnotification.hidden = false;
     }, this);
   },
 
   _showPanel: function PopupNotifications_showPanel(notificationsToShow, anchorElement) {
     this.panel.hidden = false;
 
     notificationsToShow = notificationsToShow.filter(n => {
+      if (anchorElement != n.anchorElement) {
+        return false;
+      }
+
       let dismiss = this._fireCallback(n, NOTIFICATION_EVENT_SHOWING);
       if (dismiss)
         n.dismissed = true;
       return !dismiss;
     });
     if (!notificationsToShow.length)
       return;