diff --git a/mailnews/compose/resources/content/MsgComposeCommands.js b/mailnews/compose/resources/content/MsgComposeCommands.js index b2dc6749f63a..567a5a94248e 100644 --- a/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mailnews/compose/resources/content/MsgComposeCommands.js @@ -191,8 +191,9 @@ var gComposeRecyclingListener = { document.getElementById("format_auto").setAttribute("checked", "true"); document.getElementById("priority_normal").setAttribute("checked", "true"); - //Reset editor attributes + //Reset editor EditorResetFontAndColorAttributes(); + EditorCleanup(); //Release the nsIMsgComposeParams object if (window.arguments && window.arguments[0]) @@ -1424,6 +1425,9 @@ function ComposeLoad() function ComposeUnload() { dump("\nComposeUnload from XUL\n"); + + EditorCleanup(); + RemoveMessageComposeOfflineObserver(); RemoveDirectoryServerObserver(null); if (gCurrentIdentity) diff --git a/mailnews/compose/resources/content/messengercompose.xul b/mailnews/compose/resources/content/messengercompose.xul index a7f7c3a871a6..956a8d9a471b 100644 --- a/mailnews/compose/resources/content/messengercompose.xul +++ b/mailnews/compose/resources/content/messengercompose.xul @@ -52,6 +52,7 @@ onunload="ComposeUnload()" onload="ComposeLoad()" onclose="return DoCommandClose()" + onfocus="EditorOnFocus()" title="&msgComposeWindow.title;" windowtype="msgcompose" width="640" height="480"