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

Closed
dwarjie opened this issue Dec 16, 2024 · 2 comments
Closed

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

dwarjie opened this issue Dec 16, 2024 · 2 comments

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

@xiao252
Copy link

xiao252 commented Jan 2, 2025

I tried updating @codemirror/view to 6.36.1 but the problem still exists

@dwarjie
Copy link
Author

dwarjie commented Jan 10, 2025

Hi @xiao252, sorry for the late reply. I just actually used the original Codemirror instead of using this React CodeMirror

@dwarjie dwarjie closed this as completed Jan 10, 2025
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

2 participants