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

[Bug] Block cursor text rendering issue on Safari #118

Open
cyanzhong opened this issue Apr 26, 2023 · 2 comments
Open

[Bug] Block cursor text rendering issue on Safari #118

cyanzhong opened this issue Apr 26, 2023 · 2 comments
Assignees

Comments

@cyanzhong
Copy link

cyanzhong commented Apr 26, 2023

Hello folks, thanks for making this! I've been trying to integrate vim mode to my little app MarkEdit and discovered this bug.

Since I am working on a native macOS app, I use Safari as the browser to load the editor, please check this video.

Screen.Recording.2023-04-26.at.12.43.28.PM.mov

As I move the cursor, the character rendered on the block cursor doesn't perfectly match the main editor. Interestingly, not all characters can reproduce this, in this example video, the { character works fine.

I am not sure if it has something to do with the coordsAtPos method in CodeMirror or not, and I am trying to investigate the root cause. It could also be a font issue on Safari, since I was not able to reproduce using Chrome.

Opening an issue here to track and in case you have some ideas. Thanks.

@cyanzhong
Copy link
Author

Looking into this screenshot closely, I think it's related to coordAtPos:

image

@cyanzhong
Copy link
Author

cyanzhong commented Apr 26, 2023

Opened a thread in codemirror forums too: https://discuss.codemirror.net/t/block-cursor-text-rendering-issue-on-safari/6371 it seems normal text selection also has the same problem.

Here's also an issue in codemirror/dev repo: codemirror/dev#1149.

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

No branches or pull requests

2 participants