Don't issue the compose-send-message until after we have tried to spell check the document

and test for a subject.

This makes us not do the cert lookup against ldap directories until after all these dialogs are done.
This commit is contained in:
scott%scott-macgregor.org 2004-01-21 07:32:58 +00:00
parent a3f8224cd8
commit 09ebc1d823

View File

@ -1614,10 +1614,6 @@ function GenericSendMessage( msgType )
msgCompFields.subject = subject;
Attachments2CompFields(msgCompFields);
var event = document.createEvent('Events');
event.initEvent('compose-send-message', false, true);
document.getElementById("msgcomposeWindow").dispatchEvent(event);
if (msgType == nsIMsgCompDeliverMode.Now || msgType == nsIMsgCompDeliverMode.Later)
{
//Do we need to check the spelling?
@ -1721,6 +1717,13 @@ function GenericSendMessage( msgType )
gMsgCompose.SetDocumentCharset(fallbackCharset.value);
}
try {
// just before we try to send the message, fire off the compose-send-message event for listeners
// such as smime so they can do any pre-security work such as fetching certificates before sending
var event = document.createEvent('Events');
event.initEvent('compose-send-message', false, true);
document.getElementById("msgcomposeWindow").dispatchEvent(event);
gWindowLocked = true;
disableEditableFields();
updateComposeItems();