Bug 1327938 - Clear the existing timeout before creating a new one, as we should only have one autoclose timer running at a time. r?mak draft
authorJared Wein <jwein@mozilla.com>
Wed, 18 Jan 2017 11:17:10 -0500
changeset 463195 d53b060a1e32bcbd976c0eb1808fd4a88e89f07d
parent 462655 1c7f975e511120eebe45e06a919e0e88bfb10716
child 542595 00b0a19fbb789e9cb7bafb122f56a27c520e24f8
push id41976
push userjwein@mozilla.com
push dateWed, 18 Jan 2017 16:20:49 +0000
reviewersmak
bugs1327938
milestone53.0a1
Bug 1327938 - Clear the existing timeout before creating a new one, as we should only have one autoclose timer running at a time. r?mak MozReview-Commit-ID: 9HdSMGWRvb1
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -145,16 +145,17 @@ var StarUI = {
         // auto-close if new and not interacted with
         if (this._isNewBookmark) {
           // 3500ms matches the timeout that Pocket uses in
           // browser/extensions/pocket/content/panels/js/saved.js
           let delay = 3500;
           if (this._closePanelQuickForTesting) {
             delay /= 10;
           }
+          clearTimeout(this._autoCloseTimer);
           this._autoCloseTimer = setTimeout(() => {
             this.panel.hidePopup();
           }, delay);
         }
         break;
     }
   },