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 insertNodes bugs #5325

Merged
merged 4 commits into from
Dec 2, 2023
Merged

Fix insertNodes bugs #5325

merged 4 commits into from
Dec 2, 2023

Conversation

GermanJablo
Copy link
Contributor

@GermanJablo GermanJablo commented Dec 2, 2023

From Discord:

there's 1 or 2 potential issues that we to iterate on asap or revert the commit and take a look at carefully.

This error has been reported multiple times among employees on clipboard paste before we reverted:

Cannot read properties of null (reading 'append')

Based on the trace this is pointing to:
lastInsertedBlock.append(...insertedParagraph.getChildren());

Second and not yet sure if connected, when there's a new line at the end it crashes before the selection is lost (the line break node is removed before so we can't restore to it).

cc @zurfyx

this replace #5324

Copy link

vercel bot commented Dec 2, 2023

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

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2023 4:11am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2023 4:11am

@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 Dec 2, 2023
@GermanJablo GermanJablo changed the base branch from fixinser2 to main December 2, 2023 04:08
Copy link
Member

@zurfyx zurfyx left a comment

Choose a reason for hiding this comment

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

Appreciate the quick iteration on this!

packages/lexical/src/LexicalSelection.ts Show resolved Hide resolved
@zurfyx zurfyx merged commit 9836d54 into facebook:main Dec 2, 2023
44 of 45 checks passed
@GermanJablo GermanJablo deleted the fixinser2 branch December 3, 2023 04:42
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