Bug 635420 - Clicking on content within Normal tab of Composer and stops switching to other tabs; r=ehsan a=bsmedberg

This commit is contained in:
Neil Rashbrook 2011-02-28 13:04:05 -08:00
parent 167f22bffd
commit 42274702a1
2 changed files with 4 additions and 1 deletions

View File

@ -453,7 +453,9 @@ nsEditingSession::SetupEditorOnWindow(nsIDOMWindow *aWindow)
// Try to reuse an existing editor
nsCOMPtr<nsIEditor> editor = do_QueryReferent(mExistingEditor);
if (!editor) {
if (editor) {
editor->PreDestroy(PR_FALSE);
} else {
editor = do_CreateInstance(classString, &rv);
NS_ENSURE_SUCCESS(rv, rv);
mExistingEditor = do_GetWeakReference(editor);

View File

@ -440,6 +440,7 @@ nsEditor::PreDestroy(PRBool aDestroyingFrames)
mEditorObservers.Clear();
mDocStateListeners.Clear();
mInlineSpellChecker = nsnull;
mRootElement = nsnull;
mDidPreDestroy = PR_TRUE;
return NS_OK;