Bug 468740 Compose window resets itself when you open an attachment r+sr=Neil

This commit is contained in:
Krang 2009-01-19 11:49:48 +00:00
Родитель 0572230c79
Коммит 3744decafb
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -1425,7 +1425,8 @@ var gMsgEditorCreationObserver =
if (aTopic == "obs_documentCreated") if (aTopic == "obs_documentCreated")
{ {
var editor = GetCurrentEditor(); var editor = GetCurrentEditor();
if (editor && GetCurrentCommandManager() == aSubject) var commandManager = GetCurrentCommandManager();
if (editor && commandManager == aSubject)
InitEditor(editor); InitEditor(editor);
// Now that we know this document is an editor, update commands now if // Now that we know this document is an editor, update commands now if
// the document has focus, or next time it receives focus via // the document has focus, or next time it receives focus via
@ -1434,6 +1435,8 @@ var gMsgEditorCreationObserver =
updateComposeItems(); updateComposeItems();
else else
gLastWindowToHaveFocus = null; gLastWindowToHaveFocus = null;
commandManager.removeCommandObserver(this, "obs_documentCreated");
} }
} }
} }