Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

coordsAtPos doesn't match text rendering position on Safari #1149

Closed

Description

@cyanzhong

Describe the issue

I initially discovered this issue when I was exploring codemirror-vim on Safari: replit/codemirror-vim#118, I also started a thread on the forum.

Meanwhile, I spent some time investigating how coordsAtPos is implemented and seems it uses getClientRects, which makes me pessimistic about fixing this issue.

Browser and platform

Safari on Mac.

Activity

  1. marijnh commented on May 2, 2023

    @marijnh
    Member

    Do you have a minimal reproduction script for this?

  2. cyanzhong commented on May 2, 2023

    @cyanzhong
    ContributorAuthor

    Thank you for the quick response.

    To reproduce the block cursor issue, I used the playground provided by replit: https://replit.com/@util/codemirror-vim, source code: https://github.com/replit/codemirror-vim/tree/master/dev.

    To reproduce the selection position difference I showed in the forum, I used codemirror demos: https://codemirror.net/try/.

    Just open using both Chrome and Safari and I was able to see the difference, I am on macOS Ventura.

  3. marijnh commented on May 3, 2023

    @marijnh
    Member

    I am not seeing this, even when zoomed all the way in.

  4. cyanzhong commented on May 18, 2023

    @cyanzhong
    ContributorAuthor

    That's weird.. I tried and reproduced using both Monterey and Ventura.

  5. hronro commented on May 23, 2023

    @hronro

    I confirm that I am experiencing the same issue on an M1 Mac mini running Monterey 12.6.5 and Safari Version 16.5.

  6. marijnh commented on Nov 17, 2025

    @marijnh
    Member

    Not sure if this is still an issue. Closing this until I get new information.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions