-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[lexical-link] Bug Fix: Removing a link from descendants #6656
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic looks like it's probably correct, but it would be nice to have a bit of test coverage!
There's probably some efficiency that could be gained by checking only the anchor and focus parents, otherwise the LinkNode itself would be present in the selection's nodes.
+1 on a test covering this use case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to merge! have noted the test case addition todo here: #6665
Description
At the moment it is possible to delete LinkNode only when children are TextNode. But if there is another node inside the link above the text, deletion will not work.
With this PR I fix this behavior and show how it works using the MarkNode example (via adding a comment) in lexical-playground
Test plan
Before
before.mov
After
after.mov