Skip to content

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

Open

Description

@cyanzhong

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.

Activity

  1. cyanzhong commented on Apr 26, 2023

    @cyanzhong
    Author

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

    image

  2. cyanzhong commented on Apr 26, 2023

    @cyanzhong
    Author

    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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions