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
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
--- 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