Fix for bug 403501 (Rich text editing broken after back, forward in history). r/sr=jst.

This commit is contained in:
peterv@propagandism.org 2007-12-04 16:28:24 -08:00
parent 03829665a9
commit 7063ca8796
2 changed files with 3 additions and 2 deletions

View File

@ -1006,7 +1006,7 @@ nsDocShell::FirePageHideNotification(PRBool aIsUnload)
// Now make sure our editor, if any, is torn down before we go
// any farther.
if (mEditorData) {
if (mEditorData && aIsUnload) {
mEditorData->TearDownEditor();
}

View File

@ -763,7 +763,8 @@ nsEditingSession::OnStateChange(nsIWebProgress *aWebProgress,
}
// Document level notification...
if (aStateFlags & nsIWebProgressListener::STATE_IS_DOCUMENT) {
if (aStateFlags & nsIWebProgressListener::STATE_IS_DOCUMENT &&
!(aStateFlags & nsIWebProgressListener::STATE_RESTORING)) {
#ifdef NOISY_DOC_LOADING
printf("STATE_START & STATE_IS_DOCUMENT flags=%x\n", aStateFlags);
#endif