Bug 1572106 - On Windows show the detached attachment text with the hyperlinktext color. r=alta88 a=jorgk
authorRichard Marti <richard.marti@gmail.com>
Wed, 07 Aug 2019 21:44:07 +0200
changeset 36148 8dd24940ccfa4d13dad9490e14a875634de79be7
parent 36147 16a23290aead7ae74a967f509e1fc14bdf558b6a
child 36149 e28a7f022182740449c07d97f510d1b2cfb09779
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersalta88, jorgk
bugs1572106
Bug 1572106 - On Windows show the detached attachment text with the hyperlinktext color. r=alta88 a=jorgk
mail/base/content/attachmentList.css
mail/base/content/msgHdrView.js
mail/themes/windows/mail/attachmentList.css
--- a/mail/base/content/attachmentList.css
+++ b/mail/base/content/attachmentList.css
@@ -71,19 +71,14 @@
   text-decoration-line: line-through;
 }
 
 .attachmentItem > * {
   pointer-events: none;
 }
 
 .attachmentcell-size {
-  color: -moz-FieldText;
   opacity: 0.6;
 }
 
-.attachmentItem:not(.notfound).text-link:hover {
-  text-decoration: none !important;
+.attachmentItem:not(.notfound):hover .attachmentcell-name.text-link {
+  text-decoration: underline;
 }
-
-.attachmentItem:not(.notfound).text-link:hover label.attachmentcell-name {
-  text-decoration: underline;
-}
\ No newline at end of file
--- a/mail/base/content/msgHdrView.js
+++ b/mail/base/content/msgHdrView.js
@@ -2343,17 +2343,18 @@ function displayAttachmentsForExpandedVi
                                   `MsgStatusFeedback.setOverLink("${displayUrl}")`);
       attachmentitem.setAttribute("onmouseout",
                                   "MsgStatusFeedback.setOverLink('')");
       attachmentitem.setAttribute("onfocus",
                                   `MsgStatusFeedback.setOverLink("${displayUrl}")`);
       attachmentitem.setAttribute("onblur",
                                   "MsgStatusFeedback.setOverLink('')");
 
-      attachmentitem.classList.add("text-link");
+      let name = attachmentitem.getElementsByClassName("attachmentcell-name");
+      name[0].classList.add("text-link");
 
       if (attachment.isLinkAttachment) {
         if (index == 0) {
           attachment.size = currentAttachments[index].size;
         }
       }
 
       if (!attachment.hasFile) {
--- a/mail/themes/windows/mail/attachmentList.css
+++ b/mail/themes/windows/mail/attachmentList.css
@@ -15,23 +15,26 @@
 .attachmentcell-name,
 .attachmentcell-size {
   padding-top: 1px;
 }
 
 @media (-moz-windows-default-theme) {
   .attachmentItem {
     border: 1px solid transparent;
-    color: -moz-FieldText !important;
     background-color: transparent;
     background-repeat: no-repeat;
     background-size: 100% 100%;
     padding: 1px;
   }
 
+  #attachmentList:focus > .attachmentItem[selected="true"] {
+    color: -moz-FieldText;
+  }
+
   .attachmentlist[orient="horizontal"] {
     margin-inline-end: 1px;
     margin-bottom: 1px;
   }
 
   .attachmentList[orient="horizontal"] .attachmentItem {
     margin-top: 1px;
     margin-inline-start: 1px;