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

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

Open
cyanzhong opened this issue May 2, 2023 · 5 comments
Open

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

cyanzhong opened this issue May 2, 2023 · 5 comments

Comments

@cyanzhong
Copy link
Contributor

cyanzhong commented May 2, 2023

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.

@marijnh
Copy link
Member

marijnh commented May 2, 2023

Do you have a minimal reproduction script for this?

@cyanzhong
Copy link
Contributor Author

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.

@marijnh
Copy link
Member

marijnh commented May 3, 2023

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

@cyanzhong
Copy link
Contributor Author

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

@hronro
Copy link

hronro commented May 23, 2023

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

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

3 participants