Bug 60626: Remove javascrit warning. Thanks gemal@gemal.dk (Henrik Gemal) for provinding the patch.

R=ducarroz, SR=mscott
Bug 61947: Pressing enter into an empty address switch the focus to subject field. Thanks hidday@geocities.com(Fabian Guisset) for providing part of the fix.
R=sspitzer, SR=bienvenu
This commit is contained in:
ducarroz%netscape.com 2000-12-07 00:41:21 +00:00
parent cf018a27ff
commit 72e9526bd8

View File

@ -146,7 +146,7 @@ function CompFields2Recipients(msgCompFields, msgType)
function awSetInputAndPopupValue(inputElem, inputValue, popupElem, popupValue, rowNumber)
{
// remove leading spaces
while (inputValue[0] == " " )
while (inputValue && inputValue[0] == " " )
inputValue = inputValue.substring(1, inputValue.length);
inputElem.setAttribute("value", inputValue);
@ -348,15 +348,24 @@ function awClickEmptySpace(targ, setFocus)
function awReturnHit(inputElement)
{
var row = awGetRowByInputElement(inputElement);
if ( inputElement.value )
{
var nextInput = awGetInputElement(row+1);
if ( !nextInput )
var nextInput = awGetInputElement(row+1);
if ( !nextInput )
{
if ( inputElement.value )
awAppendNewRow(true);
else
awSetFocus(row+1, nextInput);
}
else // No adress entered, switch to Subject field
{
var subjectField = document.getElementById( 'msgSubject' );
subjectField.select();
subjectField.focus();
}
}
else
{
nextInput.select();
awSetFocus(row+1, nextInput);
}
}
function awDeleteHit(inputElement)