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
This commit is contained in:
bzbarsky%mit.edu 2004-05-02 22:14:49 +00:00
parent 112bc0e405
commit 1c4ef3efa1
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)
{