Let the user tabs into the body from the subject edit field. Fix bug 10932

This commit is contained in:
ducarroz%netscape.com 1999-09-13 22:20:07 +00:00
Родитель 6062bf5382
Коммит 410b750788
2 изменённых файлов: 39 добавлений и 4 удалений

Просмотреть файл

@ -24,6 +24,7 @@ var msgCompose = null;
var MAX_RECIPIENTS = 0;
var numAttachments = 0;
var currentAttachment = null;
var tabIntoBodyPhase = 0;
var other_header = "";
var update_compose_title_as_you_type = true;
@ -498,8 +499,6 @@ function CloseWindow()
msgCompose.CloseWindow();
}
function AttachFile()
{
dump("AttachFile()\n");
@ -569,3 +568,33 @@ function AttachVCard()
{
dump("AttachVCard()\n");
}
function ShouldITabIntoBody(phase)
{
if (phase != tabIntoBodyPhase)
{
tabIntoBodyPhase = 0;
return;
}
switch (phase)
{
case 0:
tabIntoBodyPhase ++;
setTimeout("tabIntoBodyPhase = 0;", 250);
break;
case 1:
tabIntoBodyPhase ++;
break;
case 2:
contentWindow.focus();
tabIntoBodyPhase = 0;
break;
default:
tabIntoBodyPhase = 0;
break;
}
}

Просмотреть файл

@ -278,7 +278,10 @@ Rights Reserved.
<box align="vertical" flex="60%">
<box align="horizontal" flex="100%">
<html:div flex="20%">&fromAddr.label;</html:div>
<html:select id="msgIdentity" flex="80%"/>
<html:select id="msgIdentity" flex="80%"
onkeyup="if (event.which == 9) ShouldITabIntoBody(2);"
onfocus="ShouldITabIntoBody(1);"
/>
</box>
<spring style="height:0.5em"/>
<box align="horizontal" flex="100%">
@ -293,7 +296,10 @@ Rights Reserved.
<box align="horizontal" flex="100%">
<html:div flex="20%">&subject.label;</html:div>
<html:input id="msgSubject" type="text" flex="80%" onkeyup="SetComposeWindowTitle(event.which);"/>
<html:input id="msgSubject" type="text" flex="80%"
onkeyup="SetComposeWindowTitle(event.which);"
onblur="ShouldITabIntoBody(0);"
/>
</box>
</box>
</box>