fix for bug #90539. delete key doesn't work in the stand alone msg window

(unless you open the edit menu).  also, set focus to the message pane in the
stand alone msg window so the arrow keys (and other things) work right away.
r/sr=bienvenu
This commit is contained in:
sspitzer%netscape.com 2003-01-17 02:45:38 +00:00
parent e2d1a98dd2
commit 8db20baa1d
2 changed files with 21 additions and 4 deletions

View File

@ -754,6 +754,9 @@ function FocusRingUpdate_Mail()
gLastFocusedElement = currentFocusedElement;
// since we just changed the pane with focus we need to update the toolbar to reflect this
// XXX TODO
// can we optimize
// and just update cmd_delete and button_delete?
UpdateMailToolbar("focus");
}
}

View File

@ -271,12 +271,26 @@ function OnLoadMessageWindow()
CreateView(originalView)
setTimeout("var msgKey = extractMsgKeyFromURI(gCurrentMessageUri); gDBView.loadMessageByMsgKey(msgKey); gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete; UpdateStandAloneMessageCounts();", 0);
setTimeout(OnLoadMessageWindowDelayed, 0);
SetupCommandUpdateHandlers();
var messagePaneFrame = top.frames['messagepane'];
if (messagePaneFrame)
messagePaneFrame.focus();
}
function OnLoadMessageWindowDelayed()
{
var msgKey = extractMsgKeyFromURI(gCurrentMessageUri);
gDBView.loadMessageByMsgKey(msgKey);
gNextMessageViewIndexAfterDelete = gDBView.msgToSelectAfterDelete;
UpdateStandAloneMessageCounts();
// set focus to the message pane
window.content.focus();
// since we just changed the pane with focus we need to update the toolbar to reflect this
// XXX TODO
// can we optimize
// and just update cmd_delete and button_delete?
UpdateMailToolbar("focus");
}
function CreateView(originalView)