Reland 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=mkmelin
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sun, 26 Oct 2014 14:21:16 +0200
changeset 20137 fbb5a78e714032b4b14b6e169fac39a3ba8c8d9a
parent 20136 ac992dca2cbe25313e7c8d874b9b707d2c3e66f7
child 20138 f60d5fce54fc05ca3123c0844cbc4c8dbc4816c4
push id39
push usermkmelin@iki.fi
push dateSun, 01 Feb 2015 12:26:15 +0000
treeherdercomm-esr31@fbb5a78e7140 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspaenglab, mconley, mkmelin
bugs1043784
Reland 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=mkmelin
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