Bug 1345773 - Don't call updatePreview for TabAttrModified events for the "select" attribute, r=dao draft
authorSubhdeep Saha <subhdeepsaha@gmail.com>
Thu, 09 Mar 2017 21:06:35 +0530
changeset 495981 0ecdc19cc6d28c60ab8cc13447db1186225dbb56
parent 495884 8fca49c2e3cfcbb0c3ab596a0fc7b2640e7e99ed
child 496553 8c37d5549199a355aebf582ce03fa6d3976aa7aa
child 498048 74cc61579f73e8611aca0fd0e9eb9cb3afcea098
push id48492
push userbmo:subhdeepsaha@gmail.com
push dateThu, 09 Mar 2017 17:18:00 +0000
reviewersdao
bugs1345773
milestone55.0a1
Bug 1345773 - Don't call updatePreview for TabAttrModified events for the "select" attribute, r=dao MozReview-Commit-ID: 9GSnGxJoNne
browser/base/content/browser-ctrlTab.js
--- a/browser/base/content/browser-ctrlTab.js
+++ b/browser/base/content/browser-ctrlTab.js
@@ -469,20 +469,20 @@ var ctrlTab = {
   },
 
   handleEvent: function ctrlTab_handleEvent(event) {
     switch (event.type) {
       case "SSWindowRestored":
         this._initRecentlyUsedTabs();
         break;
       case "TabAttrModified":
-        // tab attribute modified (i.e. label, busy, image, selected)
+        // tab attribute modified (i.e. label, busy, image)
         // update preview only if tab attribute modified in the list
         if (event.detail.changed.some(
-          (elem, ind, arr) => ["label", "busy", "image", "selected"].includes(elem))) {
+          (elem, ind, arr) => ["label", "busy", "image"].includes(elem))) {
           for (let i = this.previews.length - 1; i >= 0; i--) {
             if (this.previews[i]._tab && this.previews[i]._tab == event.target) {
               this.updatePreview(this.previews[i], event.target);
               break;
             }
           }
         }
         break;