From 3744decafbcc3046c804e13be3a406422780fb8a Mon Sep 17 00:00:00 2001 From: Krang Date: Mon, 19 Jan 2009 11:49:48 +0000 Subject: [PATCH] Bug 468740 Compose window resets itself when you open an attachment r+sr=Neil --- mailnews/compose/resources/content/MsgComposeCommands.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mailnews/compose/resources/content/MsgComposeCommands.js b/mailnews/compose/resources/content/MsgComposeCommands.js index 2b7cbcd8f2..7834e93d9a 100644 --- a/mailnews/compose/resources/content/MsgComposeCommands.js +++ b/mailnews/compose/resources/content/MsgComposeCommands.js @@ -1425,7 +1425,8 @@ var gMsgEditorCreationObserver = if (aTopic == "obs_documentCreated") { var editor = GetCurrentEditor(); - if (editor && GetCurrentCommandManager() == aSubject) + var commandManager = GetCurrentCommandManager(); + if (editor && commandManager == aSubject) InitEditor(editor); // Now that we know this document is an editor, update commands now if // the document has focus, or next time it receives focus via @@ -1434,6 +1435,8 @@ var gMsgEditorCreationObserver = updateComposeItems(); else gLastWindowToHaveFocus = null; + + commandManager.removeCommandObserver(this, "obs_documentCreated"); } } }