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
Родитель 55d2512f30
Коммит 99253c02a4
1 изменённых файлов: 0 добавлений и 6 удалений

Просмотреть файл

@ -2666,12 +2666,6 @@ nsTextEditorState::SetValue(const nsAString& aValue, const nsAString* aOldValue,
} }
} else { } else {
AutoDisableUndo disableUndo(textEditor); 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); textEditor->SetText(newValue);
} }