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

[lexical-yjs] Bug fix: Fix cursor position after undo in collab mode #6070

Merged
merged 4 commits into from
May 10, 2024

Conversation

KatsiarynaDzibrova
Copy link
Contributor

Closes: #6010, #4846

The current logic uses previous selection for calculating new cursor position, which does not work correctly, if the last action includes adding new text.

Test plan

Before

cursor-undo-before

After

cursor-undo-after

Copy link

vercel bot commented May 9, 2024

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 May 9, 2024 2:10pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2024 2:10pm

@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 May 9, 2024
ivailop7
ivailop7 previously approved these changes May 9, 2024
Copy link
Collaborator

@ivailop7 ivailop7 left a comment

Choose a reason for hiding this comment

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

@fantactuka @StyleT @bencarletonn @ebads67 could you guys have a look as well. LGTM to me.

@ivailop7
Copy link
Collaborator

ivailop7 commented May 9, 2024

@KatsiarynaDzibrova you would need to fix the warns as per the new eslint rule for integrity to pass

@KatsiarynaDzibrova
Copy link
Contributor Author

@KatsiarynaDzibrova you would need to fix the warns as per the new eslint rule for integrity to pass

Fixed it

@StyleT
Copy link
Contributor

StyleT commented May 10, 2024

Awesome work!

@ivailop7 ivailop7 merged commit b5fa87d into facebook:main May 10, 2024
45 checks passed
@matsuyama-k1
Copy link
Contributor

matsuyama-k1 commented May 15, 2024

oh, you steal my work?😢
https://github.com/facebook/lexical/pull/5975/files

@matsuyama-k1
Copy link
Contributor

matsuyama-k1 commented May 15, 2024

it is almost same with my code. if you want to use, you should mention me because it is my contribution..

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.

5 participants