From 99253c02a4922458ed64cfea75bbb07d8fe183ef Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Tue, 1 Aug 2017 21:17:49 -0400 Subject: [PATCH] Bug 1386471 - Don't remove all ranges before calling SetText(); r=masayuki --- dom/html/nsTextEditorState.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dom/html/nsTextEditorState.cpp b/dom/html/nsTextEditorState.cpp index be3de955e2e7..b25ad39849a0 100644 --- a/dom/html/nsTextEditorState.cpp +++ b/dom/html/nsTextEditorState.cpp @@ -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); }