Bug 1343037 part 4. Fix type changes on an input to properly grab the selection offsets from the old editor before we ask the editor state for them. r=ehsan

MozReview-Commit-ID: IDdt0qedJpT
This commit is contained in:
Boris Zbarsky
2017-03-09 14:44:04 -05:00
parent a61a09b9f7
commit d41e71a037
3 changed files with 13 additions and 0 deletions

View File

@@ -5136,6 +5136,7 @@ HTMLInputElement::HandleTypeChange(uint8_t aNewType)
nsTextEditorState::SelectionProperties sp;
if (GetEditorState()) {
mInputData.mState->SyncUpSelectionPropertiesBeforeDestruction();
sp = mInputData.mState->GetSelectionProperties();
}