зеркало из https://github.com/mozilla/pjs.git
fix 236219 Unreliable highlighting in compose window when tabbing thru, patch by mcow@well.com, r=bienvenu, sr=mscott
This commit is contained in:
Родитель
32666348b2
Коммит
cbfea59393
|
@ -1725,7 +1725,7 @@ function GenericSendMessage( msgType )
|
|||
{
|
||||
// We disable spellcheck for the following -subject line, attachment pane, identity and addressing widget
|
||||
// therefore we need to explicitly focus on the mail body when we have to do a spellcheck.
|
||||
window.content.focus();
|
||||
SetMsgBodyFrameFocus();
|
||||
window.cancelSendMessage = false;
|
||||
try {
|
||||
window.openDialog("chrome://editor/content/EdSpellCheck.xul", "_blank",
|
||||
|
@ -2403,7 +2403,7 @@ function getIdentityForKey(key)
|
|||
function AdjustFocus()
|
||||
{
|
||||
//dump("XXX adjusting focus\n");
|
||||
var element = document.getElementById("addressCol2#" + awGetNumberOfRecipients());
|
||||
var element = awGetInputElement(awGetNumberOfRecipients());
|
||||
if (element.value == "") {
|
||||
//dump("XXX focus on address\n");
|
||||
awSetFocus(awGetNumberOfRecipients(), element);
|
||||
|
@ -2417,7 +2417,7 @@ function AdjustFocus()
|
|||
}
|
||||
else {
|
||||
//dump("XXX focus on body\n");
|
||||
window.content.focus();
|
||||
SetMsgBodyFrameFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2779,7 +2779,7 @@ function FocusOnFirstAttachment()
|
|||
var bucketList = document.getElementById("attachmentBucket");
|
||||
|
||||
if (bucketList && bucketList.getRowCount())
|
||||
bucketTree.selectedIndex(0);
|
||||
bucketList.selectedIndex = 0;
|
||||
}
|
||||
|
||||
function AttachmentElementHasItems()
|
||||
|
@ -3140,12 +3140,12 @@ function subjectKeyPress(event)
|
|||
switch(event.keyCode) {
|
||||
case 9:
|
||||
if (!event.shiftKey) {
|
||||
window.content.focus();
|
||||
SetMsgBodyFrameFocus();
|
||||
event.preventDefault();
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
window.content.focus();
|
||||
SetMsgBodyFrameFocus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3318,7 +3318,7 @@ function DisplaySaveFolderDlg(folderURI)
|
|||
|
||||
function SetMsgAddressingWidgetTreeElementFocus()
|
||||
{
|
||||
var element = document.getElementById("msgRecipient#" + awGetNumberOfRecipients());
|
||||
var element = awGetInputElement(awGetNumberOfRecipients());
|
||||
awSetFocus(awGetNumberOfRecipients(), element);
|
||||
}
|
||||
|
||||
|
@ -3340,7 +3340,10 @@ function SetMsgAttachmentElementFocus()
|
|||
|
||||
function SetMsgBodyFrameFocus()
|
||||
{
|
||||
window.content.focus();
|
||||
// bug 236219: never just set the focus to window.content, that fails to perform
|
||||
// the 'unfocus' operation on the element that currently has focus.
|
||||
document.getElementById("appcontent").focus(); // focus to editor's container
|
||||
window.content.focus(); // focus to editor
|
||||
}
|
||||
|
||||
function GetMsgAddressingWidgetTreeElement()
|
||||
|
|
Загрузка…
Ссылка в новой задаче