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

Cursor position issue when typing on the end of the line #709

Open
dwarjie opened this issue Dec 16, 2024 · 1 comment
Open

Cursor position issue when typing on the end of the line #709

dwarjie opened this issue Dec 16, 2024 · 1 comment

Comments

@dwarjie
Copy link

dwarjie commented Dec 16, 2024

Background

I have implemented a simple code editor for my chrome extension. Basically, I am embedding a code editor into a DOM that will sync the value into another editor element.

Issue

When I am typing at the end of the line, the cursor position is not working properly.

Initial String (cursor position is at the end of the line)
image
Typed the letter "c" (cursor position issue)
image
Typed the letter "e"
image

Possible solution

I have found a discussion regarding this in the official CodeMirror Discuss Forum . It is actually solved by marijin. I'm just not sure how to apply it in here. Maybe update the @codemirror/view version into 6.35.2?

I you want to see my code, here's my github repo

@dwarjie
Copy link
Author

dwarjie commented Dec 17, 2024

I'm unsure if this is how to fix it, but following this issue seems to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant