-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 incorrect on Mac error #4794
Comments
Do you see the same issue on ace.c9.io? |
Nope, we did not see the same issue on ace.c9.io on the Mac. I'm pretty sure the font I'm using is a monospace font: |
I just discovered this can happen if you override letter-spacing for the editor. With Hope that helps. |
@matthew-dean were you setting |
@nightwing I was setting it on the It looks like, on my body element, I have I had issues where the cursor position was wrong on resize on Mac. Then, when I tested on Windows (this is all in Google Chrome), the cursor position was always wrong. When I removed letter-spacing: 0, it fixed Windows and surprisingly, fixed the resizing bug on Mac. So, I was wrong that it was the "default" letter-spacing. Probably Ace expects a zero letter spacing. But for some reason my CSS was mucking up the calculation of cursor position. It looks like it's trying to take letter-spacing into account (LS: 0 = left: 32px, LS: 0.1px = left: 32.40125px for cursor), so I can't account for why it was incorrect. All I know is what fixed it. Any ideas? |
Try to add to your code this: ` .ace_editor, .ace_editor div {
|
@doomsayer13 Perfect dude ! Solved ! Tkz !!! |
added it a css file which loads before when ace editor loads
}` |
had you solve that?what suggest can you support to me?i met the same question |
Sorry guys, I'm not hacking anymore the ace editor. |
Might be related to #2548 |
I have the latest version of these ace.js file from this repo, the ace builds, but when typing into the editor on my Mac, the cursor position is off by one.
Thanks!
Emily
The text was updated successfully, but these errors were encountered: