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

Revert Fix $transferStartingElementPointToTextPoint() #4756 #5094

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

thegreatercurve
Copy link
Contributor

@thegreatercurve thegreatercurve commented Oct 6, 2023

This is causing issues in the PlainTextPlugin prevent users from deleting line breaks within paragraph nodes. When the cursor is collapsed and on a LineBreakNode the selection is of type element which causes the condition to trigger, incrementing the offset even during a deletion.

I think we can the original PR as it seems more like a browser bug if the base Selection offset isn't being increment for an empty node (e.g. a decorator node).

Before:

Screen.Recording.2023-10-06.at.16.12.33.mov

After:

Screen.Recording.2023-10-06.at.16.11.01.mov

@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 Oct 6, 2023
@vercel
Copy link

vercel bot commented Oct 6, 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 Oct 6, 2023 2:48pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2023 2:48pm

@github-actions
Copy link

github-actions bot commented Oct 6, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 28.28 KB (-0.06% 🔽) 566 ms (-0.06% 🔽) 172 ms (-55.94% 🔽) 737 ms
packages/lexical-rich-text/dist/LexicalRichText.js 39.57 KB (-0.05% 🔽) 792 ms (-0.05% 🔽) 378 ms (-31.21% 🔽) 1.2 s
packages/lexical-plain-text/dist/LexicalPlainText.js 39.55 KB (-0.05% 🔽) 791 ms (-0.05% 🔽) 620 ms (+15.72% 🔺) 1.5 s

@thegreatercurve thegreatercurve marked this pull request as ready for review October 6, 2023 15:23
@thegreatercurve thegreatercurve merged commit 85fb867 into main Oct 10, 2023
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