-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: bug-6851 #6854
fix: bug-6851 #6854
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
@@ -1778,7 +1778,7 @@ export class RangeSelection implements BaseSelection { | |||
possibleNode.selectStart(); | |||
return; | |||
} | |||
this.modify('extend', isBackward, 'character'); | |||
this.modify('move', isBackward, 'character'); |
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.
I don't think this change is correct but we can run the tests and see how many will fail. I haven't looked at this code closely recently but I believe the extend is intentional, to grow a collapsed selection by one character and then delete the contents of that selection.
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.
Here's a link to the unit test failure report: https://github.com/facebook/lexical/actions/runs/11956172962/job/33332485265?pr=6854
I'm going to close this as stale, since this change does not include tests and causes regressions elsewhere. Please feel free to re-open or create a new PR when you have something that works without regressions. |
#6851
update:
in LexicalSelection.ts file, change the native selection move mode from "extend" to "move", cause isCollapsed is true.
at line 1781:
this.modify('extend', isBackward, 'character'); => this.modify('move', isBackward, 'character');