Make nsFocusManager::ContentRemoved()
call HTMLEditor::FinalizeSelection()
after the removal ends
HTMLEditor::FinalizeSelection()
resets the caret and nsCaret
schedules to
paint itself with the new state. If editing host is being removed, it's already
been removed from the child chain of its parent but it still knows the parent.
Additionally, nsCaret
may still keep storing the removing editing host as the
content. In such case, we try to look for the line edge from the removing
editing host and fails to compute the index in its parent node for considering
the caret geometry. For avoiding to compute it in the unstable period,
nsFocusManager::ContentRemoved()
should call HTMLEditor::FinalizeSelection()
after the removal ends.
Differential Revision: https://phabricator.services.mozilla.com/D219845
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1872300
gecko-commit: 4d5a61f391ae9db3ac0945e2bac54f85b1827df3
gecko-reviewers: emilio