Bug 1386222 - Ensure that we always respect the undo/redo transaction history when modifying the <xul:textbox>.value dynamically through script; r=bzbarsky
This commit is contained in:
@@ -3001,6 +3001,14 @@ HTMLInputElement::SetValueInternal(const nsAString& aValue,
|
||||
NS_PRECONDITION(GetValueMode() != VALUE_MODE_FILENAME,
|
||||
"Don't call SetValueInternal for file inputs");
|
||||
|
||||
// We want to remember if the SetValueInternal() call is being made for a XUL
|
||||
// element. We do that by looking at the parent node here, and if that node
|
||||
// is a XUL node, we consider our control a XUL control.
|
||||
nsIContent* parent = GetParent();
|
||||
if (parent && parent->IsXULElement()) {
|
||||
aFlags |= nsTextEditorState::eSetValue_ForXUL;
|
||||
}
|
||||
|
||||
switch (GetValueMode()) {
|
||||
case VALUE_MODE_VALUE:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user