Bug 1043784 - after confirming autocomplete suggestion with TAB key combination, Thunderbird adds a new addressing line, does not move focus to the subject text box. ui-r=paenglab, r=mconley, a=Standard8
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sun, 26 Oct 2014 14:21:16 +0200 (2014-10-26)
changeset 20102 ba2e66184ee5214c1ab646aa0d3feabe5296732e
parent 20101 3507d510b17891a04a0d29a97f686f10fe379967
child 20103 25eeec7ade5a8b486759bfe706193fb5aab9eb7d
push id27
push usermbanner@mozilla.com
push dateTue, 25 Nov 2014 18:03:07 +0000 (2014-11-25)
treeherdercomm-esr31@e5636db97c3e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaenglab, mconley, Standard8
bugs1043784
Bug 1043784 - after confirming autocomplete suggestion with TAB key combination, Thunderbird adds a new addressing line, does not move focus to the subject text box. ui-r=paenglab, r=mconley, a=Standard8
mail/components/compose/content/addressingWidgetOverlay.js
--- a/mail/components/compose/content/addressingWidgetOverlay.js
+++ b/mail/components/compose/content/addressingWidgetOverlay.js
@@ -780,17 +780,19 @@ function awSetAutoComplete(rowNumber)
 {
     var inputElem = awGetInputElement(rowNumber);
     var selectElem = awGetPopupElement(rowNumber);
     _awSetAutoComplete(selectElem, inputElem)
 }
 
 function awRecipientTextCommand(enterEvent, element)
 {
-  awReturnHit(element);
+  // Only add new row when enter was hit (not for tab/autocomplete select).
+  if (enterEvent)
+    awReturnHit(element);
 }
 
 function awRecipientKeyPress(event, element)
 {
   switch(event.keyCode) {
   case KeyEvent.DOM_VK_RETURN:
   case KeyEvent.DOM_VK_TAB:
     // if the user text contains a comma or a line return, ignore