mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
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:
parent
112bc0e405
commit
1c4ef3efa1
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user