Regression related to focus since 0.99.0 (Cannot resolve DOM point...)
philicious opened this issue · comments
philicious commented
Description
0.99.0 must have introduced a regression as formerly working ReactEditor.focus(editor)
now crashes with "Cannot resolve DOM point..." in some cases.
So I guess it was this PR #5516 as its calling toDOMRange
Its happening if we call it right after editor.undo()
and the operations being:
undo split:
insert_node
remove_node
remove_node
set_select
CRASH
undo merge:
insert_node
remove_node
insert_node
CRASH
if we call editor.deselect()
before editor.focus()
it doesnt crash as the new code from 0.99.0
isnt triggered then
philicious commented
this is solved by #5527 in 0.101.0