-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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)
packages/virgo/src/services/event.ts
Outdated
this._editor.rangeService.setVRange({ | ||
index: this._editor.yText.length, | ||
length: range.endOffset, | ||
}); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes: #2447