Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeFromParent doesn't readjust selection #6031

Open
zurfyx opened this issue May 5, 2024 · 0 comments
Open

removeFromParent doesn't readjust selection #6031

zurfyx opened this issue May 5, 2024 · 0 comments
Labels
all-platforms-bug core Reconciler, DOM, Selection, Node, Events, Composition

Comments

@zurfyx
Copy link
Member

zurfyx commented May 5, 2024

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.

@zurfyx zurfyx added all-platforms-bug core Reconciler, DOM, Selection, Node, Events, Composition labels May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
all-platforms-bug core Reconciler, DOM, Selection, Node, Events, Composition
Projects
None yet
Development

No branches or pull requests

1 participant