Bug 1629144 - Restore Ctrl+Enter/Ctrl+Shift+Enter behaviour when an addressing row is focused. r=aleca
authorThomas Duellmann <bugzilla2007@duellmann24.net>
Tue, 14 Apr 2020 16:23:20 +1200
changeset 38818 5d4c12618d3f4c82b4c3678de117defd2ef0c9c3
parent 38817 fd4e26bf3a424d60dd0f68bb7a42cf221933a5ee
child 38819 c5eb775788e3e0e6d0254b580e5f04fa15324317
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersaleca
bugs1629144
Bug 1629144 - Restore Ctrl+Enter/Ctrl+Shift+Enter behaviour when an addressing row is focused. r=aleca
mail/components/compose/content/addressingWidgetOverlay.js
--- a/mail/components/compose/content/addressingWidgetOverlay.js
+++ b/mail/components/compose/content/addressingWidgetOverlay.js
@@ -564,22 +564,20 @@ function recipientKeyPress(event, elemen
           pills[key].focus();
           document
             .getElementById("recipientsContainer")
             .checkKeyboardSelected(event, pills[key]);
         }
       }
       break;
     case "Enter":
-      // No address entered, trim input and move focus to the next available
-      // element.
-      if (!element.value.trim()) {
+      // If no address entered, trim input and move focus to the next available
+      // element, but not for Ctrl+[Shift]+Enter keyboard shortcuts for sending.
+      if (!element.value.trim() && !event.ctrlKey) {
         element.value = "";
-        event.stopPropagation();
-        event.preventDefault();
         SetFocusOnNextAvailableElement(element);
       }
       break;
     case "Tab":
       // Trigger the autocomplete controller only if we have a value
       // to prevent interfering with the natural change of focus on Tab.
       if (element.value.trim()) {
         event.preventDefault();