Bug 1386471 - Don't remove all ranges before calling SetText(); r=masayuki

This commit is contained in:
Ehsan Akhgari
2017-08-01 21:17:49 -04:00
parent b487026f0c
commit 762ffab0d4

View File

@@ -2666,12 +2666,6 @@ nsTextEditorState::SetValue(const nsAString& aValue, const nsAString* aOldValue,
}
} else {
AutoDisableUndo disableUndo(textEditor);
if (domSel) {
// Since we don't use undo transaction, we don't need to store
// selection state. SetText will set selection to tail.
domSel->RemoveAllRanges();
}
textEditor->SetText(newValue);
}