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: select texts when clicking on blank area #2474

Merged
merged 6 commits into from
May 10, 2023

Conversation

fundon
Copy link
Contributor

@fundon fundon commented May 9, 2023

Fixes: #2447

@codesandbox
Copy link

codesandbox bot commented May 9, 2023

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@vercel
Copy link

vercel bot commented May 9, 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 May 10, 2023 4:05am
blocksuite-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 10, 2023 4:05am

@Flrande
Copy link
Member

Flrande commented May 9, 2023

I was unable to reproduce the problem in #2447 and need some time to confirm whether this fix is correct.

* master:
  fix: support dragging block to blank (toeverything#2469)
this._editor.rangeService.setVRange({
index: this._editor.yText.length,
length: range.endOffset,
});
Copy link
Contributor Author

@fundon fundon May 9, 2023

Choose a reason for hiding this comment

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

@Flrande When backward(↑) selection, the cursor will jump, start <-> end, very unstable, so changed to the current

Copy link
Member

Choose a reason for hiding this comment

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

What is the value of native range in this case? It seems that this change will make vRange overflow because the index has been reached max value (this._editor.yText.length).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2023-05-10 at 9 12 09 AM

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.

Cant select text when clicking on blank area in edgeless
2 participants