Bug 936524 - Tag names with blanks causes strange message pane summary behavior. r=squib
authoralta88@gmail.com
Thu, 05 Dec 2013 10:57:58 -0500
changeset 16965 86eef5c65d21f85537b16447019ec0fd0e4ccc68
parent 16964 54799131e04277105db1e6ca190932b7edbb6e15
child 16966 f0c0758a968d8691d3b63809f5e44ead1bf2af73
push id1074
push userbugzilla@standard8.plus.com
push dateMon, 03 Feb 2014 22:47:23 +0000
treeherdercomm-beta@6b791b5369ed [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssquib
bugs936524
Bug 936524 - Tag names with blanks causes strange message pane summary behavior. r=squib
mail/base/content/selectionsummaries.js
--- a/mail/base/content/selectionsummaries.js
+++ b/mail/base/content/selectionsummaries.js
@@ -359,17 +359,18 @@ MultiMessageSummary.prototype = {
             tags[tag.key] = tag;
           }
         }
       }
       for each (let [, tag] in Iterator(tags)) {
         let tagNode = tagsNode.ownerDocument.createElement('span');
         // see tagColors.css
         let colorClass = "blc-" + this._msgTagService.getColorForKey(tag.key).substr(1);
-        _mm_addClass(tagNode, ["tag", tag.tag, colorClass]);
+        _mm_addClass(tagNode, ["tag", colorClass]);
+        tagNode.dataset.tag = tag.tag;
         tagNode.textContent = tag.tag;
         tagsNode.appendChild(tagNode);
       }
   },
 
   /**
    * compute the size of the messages in the selection and display it
    * in the element of id "size"
@@ -592,17 +593,18 @@ ThreadSummary.prototype = {
         snippetNode.textContent = "...";
       }
       let tagsNode = msgNode.querySelector(".tags");
       let tags = this.getTagsForMsg(msgHdr);
       for each (let [,tag] in Iterator(tags)) {
         let tagNode = tagsNode.ownerDocument.createElement('span');
         // see tagColors.css
         let colorClass = "blc-" + this._msgTagService.getColorForKey(tag.key).substr(1);
-        _mm_addClass(tagNode, ["tag", tag.tag, colorClass]);
+        _mm_addClass(tagNode, ["tag", colorClass]);
+        tagNode.dataset.tag = tag.tag;
         tagNode.textContent = tag.tag;
         tagsNode.appendChild(tagNode);
       }
 
       let sender = msgNode.querySelector(".sender");
       sender.msgHdr = msgHdr;
       sender.addEventListener("click", function(e) {
         // if the msg is the first message in a collapsed thread, we need to