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(page): incorrect cursor position on pasting text #5382

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

AyushAgrawal-A2
Copy link
Contributor

@AyushAgrawal-A2 AyushAgrawal-A2 commented Nov 20, 2023

closes #5055

before:

scrnli_11_20_2023_5-20-51.PM.mp4

after:

scrnli_11_20_2023_5-19-36.PM.mp4

Changes:

  • Text paste in code block:
    1. corrected index calculation in overridden json2Block.
    2. modified existing copy/paste test to check for VRange after paste.
  • Text paste in paragraph: asyncSetVRange is flaky and sets wrong cursor position at random. Switched to getVirgoByModel for focusedBlockModel.

Copy link

vercel bot commented Nov 20, 2023

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

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2023 0:11am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Nov 20, 2023 0:11am

Copy link
Member

@doodlewind doodlewind left a comment

Choose a reason for hiding this comment

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

This looks neat, thanks!

@doodlewind doodlewind merged commit 81eabf6 into toeverything:master Nov 20, 2023
20 checks passed
@AyushAgrawal-A2 AyushAgrawal-A2 deleted the ayush/5055 branch November 20, 2023 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

Incorrect cursor position when pasting text
2 participants