-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 TableCell child nodes on paste #5951
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shubhankerism
requested review from
zurfyx,
fantactuka,
acywatson,
Fetz and
ivailop7
as code owners
April 24, 2024 11:13
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
Apr 24, 2024
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ivailop7
approved these changes
Apr 24, 2024
Thank you, we can merge this, but I'd be inclined to roll it back as soon as #5857 is ready as it fixes the same issue in a more generic manner cc @potatowagon |
Thanks Gerard! Happy to revert once the larger one lands. Do we have an ETA on the generic solution? If it's a week, we can wait it out. |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes pasting tables that have the copied html in such format:
Pasting this results in the following node structure:
which causes the editor to freeze and eventually crash on enter key press, as the text node is not wrapped in a paragraph node.
This issue is similar to the one described here and was fixed for the case when pasting empty cells.
This PR addresses the case when on paste the children of the
TableCell
node are not within a block element node.Another case to reproduce this issue is when we copy something with such html:
This results in a link node inside a tablecell node which again crashes on enter key press.
Also, this PR fixes the issue with alignment of text inside the cell as well, as this formatting can now be applied on the wrapping block element node.
So, copying from google sheets will now have the correct alignment.
Before
After