lexical
lexical copied to clipboard
removeFromParent doesn't readjust selection
Functions like removeNode
have had restoreSelection built-in for years now. removeFromParent
or their callers should do the same.
Currently, you can call insertBefore
, trigger a node removal and the selection won't be recomputed which can lead to an invalid selection, see the referenced PR.