-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fixed Caret.isAtStart #2448
base: next
Are you sure you want to change the base?
fixed Caret.isAtStart #2448
Conversation
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.
Hey, could you add a test case for this bugfix?
src/components/modules/caret.ts
Outdated
@@ -120,7 +109,7 @@ export default class Caret extends Module { | |||
return $.isEmpty(node) && !isLineBreak; | |||
}); | |||
|
|||
if (nothingAtLeft && focusOffset === firstLetterPosition) { | |||
if (nothingAtLeft && focusOffset===0) { |
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.
Lint your code pls
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.
Hi, I have added the test cases can you please review them? also I'm new to open source and TDD.
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.
Thanks👍
Hey, can someone merge this pr? |
the current Caret.isAtStart ignores white spaces causing this issue
#2429