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

fix: getTopLevelElement for decoratorNode #2741

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

im-adithya
Copy link
Contributor

If a node is inserted while a decoratorNode is selected, it gives an error as it fails to receive a topLevelElement

Fix: The topLevelElement should be itself during a node selection so that the inserted node can be added using insertAfter

Before

lexical-.13.mp4

After

lexical-.14.mp4

@vercel
Copy link

vercel bot commented Aug 1, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lexical ✅ Ready (Inspect) Visit Preview Sep 1, 2022 at 10:58AM (UTC)
lexical-playground ✅ Ready (Inspect) Visit Preview Sep 1, 2022 at 10:58AM (UTC)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 1, 2022
Copy link
Contributor

@thegreatercurve thegreatercurve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a legitimate fix to me as decorator nodes are valid at the root child level. Thanks @im-adithya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants