Bug 1067367 - Tapping the icon of a second doorhanger reopens the first doorhanger if it was already open. r=Enn, a=sledru
authorFlorian Quèze <florian@queze.net>
Mon, 29 Sep 2014 15:33:34 +0200
changeset 225174 2a65f73d9f4cb4988d843a1b346bccc8457e6123
parent 225173 1296abcca24d2475f84394ef6c080e718ddece4f
child 225175 bb93e876e1f76d7be8b973f03b3196085c994f23
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEnn, sledru
bugs1067367
milestone34.0a2
Bug 1067367 - Tapping the icon of a second doorhanger reopens the first doorhanger if it was already open. r=Enn, a=sledru
toolkit/modules/PopupNotifications.jsm
--- a/toolkit/modules/PopupNotifications.jsm
+++ b/toolkit/modules/PopupNotifications.jsm
@@ -483,19 +483,25 @@ PopupNotifications.prototype = {
     if (browser)
       browser.focus();
   },
 
   /**
    * Hides the notification popup.
    */
   _hidePanel: function PopupNotifications_hide() {
+    // We need to disable the closing animation when setting _ignoreDismissal
+    // to true, otherwise the popuphidden event will fire after we have set
+    // _ignoreDismissal back to false.
+    let transitionsEnabled = this.transitionsEnabled;
+    this.transitionsEnabled = false;
     this._ignoreDismissal = true;
     this.panel.hidePopup();
     this._ignoreDismissal = false;
+    this.transitionsEnabled = transitionsEnabled;
   },
 
   /**
    * Removes all notifications from the notification popup.
    */
   _clearPanel: function () {
     let popupnotification;
     while ((popupnotification = this.panel.lastChild)) {