mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-26 02:02:33 +00:00
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:
parent
cf018a27ff
commit
72e9526bd8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user