Don't clear undo/redo buffers when JS changes the value. Bug 158071, patch by

Martijn Wargers <m.wargers@hccnet.nl>, r=bryner, sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@155848 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-05-02 22:14:49 +00:00
parent 1c119be938
commit 2627a4e419
2 changed files with 0 additions and 12 deletions

View File

@@ -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)
{

View File

@@ -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)
{