From e3b9608edcf705ee3fb3332e8681fdb2e9b0daca Mon Sep 17 00:00:00 2001 From: Thomas Duellmann Date: Wed, 20 Dec 2017 00:44:49 +0200 Subject: [PATCH] Bug 1425891 - Remove malfunctioning accesskeys from Reorder Attachments panel, add shortcut for sorting attachments. r=Paenglab --- .../compose/content/MsgComposeCommands.js | 6 ------ .../compose/content/messengercompose.xul | 13 +++---------- .../messengercompose/messengercompose.dtd | 16 +--------------- 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js index b6f69c73de..78dda6b6b7 100644 --- a/mail/components/compose/content/MsgComposeCommands.js +++ b/mail/components/compose/content/MsgComposeCommands.js @@ -1039,7 +1039,6 @@ var attachmentBucketController = { let toggleBtn = document.getElementById("btn_sortAttachmentsToggle"); let sortDirection; let btnLabelAttr; - let btnAccKeyAttr; if (attachmentsSelectedCount() > 1) { // Sort selected attachments only. @@ -1056,11 +1055,9 @@ var attachmentBucketController = { if (btnAscending) { sortDirection = "ascending"; btnLabelAttr = "label-selection-AZ"; - btnAccKeyAttr = "accesskey-selection-AZ"; } else { sortDirection = "descending"; btnLabelAttr = "label-selection-ZA"; - btnAccKeyAttr = "accesskey-selection-ZA"; } } else { // attachmentsSelectedCount() <= 1 // Sort all attachments. @@ -1071,11 +1068,9 @@ var attachmentBucketController = { if (btnAscending) { sortDirection = "ascending"; btnLabelAttr = "label-AZ"; - btnAccKeyAttr = "accesskey-AZ"; } else { sortDirection = "descending"; btnLabelAttr = "label-ZA"; - btnAccKeyAttr = "accesskey-ZA"; } } @@ -1084,7 +1079,6 @@ var attachmentBucketController = { // The button's icon is set dynamically via CSS involving the button's // sortdirection attribute, which is forwarded by the command. toggleBtn.setAttribute("label", toggleBtn.getAttribute(btnLabelAttr)); - toggleBtn.setAttribute("accesskey", toggleBtn.getAttribute(btnAccKeyAttr)); return sortSelection ? !(currSortOrder == "equivalent" && isBlock) : !(currSortOrder == "equivalent"); diff --git a/mail/components/compose/content/messengercompose.xul b/mail/components/compose/content/messengercompose.xul index cef5586a80..9e9c94c63d 100644 --- a/mail/components/compose/content/messengercompose.xul +++ b/mail/components/compose/content/messengercompose.xul @@ -302,6 +302,8 @@ #endif + @@ -370,45 +372,36 @@ diff --git a/mail/locales/en-US/chrome/messenger/messengercompose/messengercompose.dtd b/mail/locales/en-US/chrome/messenger/messengercompose/messengercompose.dtd index 1303798a1e..9467797114 100644 --- a/mail/locales/en-US/chrome/messenger/messengercompose/messengercompose.dtd +++ b/mail/locales/en-US/chrome/messenger/messengercompose/messengercompose.dtd @@ -109,36 +109,22 @@ - - - - - - - - - - +