From 2627a4e4197859da22a11f7984fb86477cfed028 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sun, 2 May 2004 22:14:49 +0000 Subject: [PATCH] Don't clear undo/redo buffers when JS changes the value. Bug 158071, patch by Martijn Wargers , r=bryner, sr=dbaron git-svn-id: svn://10.0.0.236/trunk@155848 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsTextControlFrame.cpp | 6 ------ mozilla/layout/html/forms/src/nsTextControlFrame.cpp | 6 ------ 2 files changed, 12 deletions(-) diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index ccfa1c966bb..ec539df120e 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -2174,18 +2174,12 @@ NS_IMETHODIMP nsTextControlFrame::SetProperty(nsIPresContext* aPresContext, nsIA if (nsHTMLAtoms::value == aName) { - if (mEditor) { - mEditor->EnableUndo(PR_FALSE); // wipe out undo info - } if (mEditor && mUseEditor) { // If the editor exists, the control needs to be informed that the value // has changed. SetValueChanged(PR_TRUE); } SetValue(aValue); // set new text value - if (mEditor) { - mEditor->EnableUndo(PR_TRUE); // fire up a new txn stack - } } else if (nsHTMLAtoms::select == aName && mSelCon) { diff --git a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp index ccfa1c966bb..ec539df120e 100644 --- a/mozilla/layout/html/forms/src/nsTextControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsTextControlFrame.cpp @@ -2174,18 +2174,12 @@ NS_IMETHODIMP nsTextControlFrame::SetProperty(nsIPresContext* aPresContext, nsIA if (nsHTMLAtoms::value == aName) { - if (mEditor) { - mEditor->EnableUndo(PR_FALSE); // wipe out undo info - } if (mEditor && mUseEditor) { // If the editor exists, the control needs to be informed that the value // has changed. SetValueChanged(PR_TRUE); } SetValue(aValue); // set new text value - if (mEditor) { - mEditor->EnableUndo(PR_TRUE); // fire up a new txn stack - } } else if (nsHTMLAtoms::select == aName && mSelCon) {