From 607ad6701a78cea4b4765fcfe4ff4ffaeb4b5f51 Mon Sep 17 00:00:00 2001 From: "ftang%netscape.com" Date: Thu, 9 Dec 1999 22:35:17 +0000 Subject: [PATCH] fix bug 19358. r=jfrancis . Forece commit when we Undo, SelectAll or Paste git-svn-id: svn://10.0.0.236/trunk@55817 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/base/nsEditor.cpp | 2 ++ mozilla/editor/libeditor/base/nsEditor.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mozilla/editor/base/nsEditor.cpp b/mozilla/editor/base/nsEditor.cpp index 59c918b96b8..15e723235f6 100644 --- a/mozilla/editor/base/nsEditor.cpp +++ b/mozilla/editor/base/nsEditor.cpp @@ -446,6 +446,7 @@ nsEditor::Undo(PRUint32 aCount) { if (gNoisy) { printf("Editor::Undo ----------\n"); } nsresult result = NS_OK; + ForceCompositionEnd(); nsAutoRules beginRulesSniffing(this, kOpUndo, nsIEditor::eNone); @@ -632,6 +633,7 @@ nsEditor::EndPlaceHolderTransaction() NS_IMETHODIMP nsEditor::SelectAll() { if (!mDocWeak || !mPresShellWeak) { return NS_ERROR_NOT_INITIALIZED; } + ForceCompositionEnd(); nsCOMPtr selection; if (!mPresShellWeak) return NS_ERROR_NOT_INITIALIZED; diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index 59c918b96b8..15e723235f6 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -446,6 +446,7 @@ nsEditor::Undo(PRUint32 aCount) { if (gNoisy) { printf("Editor::Undo ----------\n"); } nsresult result = NS_OK; + ForceCompositionEnd(); nsAutoRules beginRulesSniffing(this, kOpUndo, nsIEditor::eNone); @@ -632,6 +633,7 @@ nsEditor::EndPlaceHolderTransaction() NS_IMETHODIMP nsEditor::SelectAll() { if (!mDocWeak || !mPresShellWeak) { return NS_ERROR_NOT_INITIALIZED; } + ForceCompositionEnd(); nsCOMPtr selection; if (!mPresShellWeak) return NS_ERROR_NOT_INITIALIZED;