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
--- 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;
}
},