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

input cursor between lines (when using custom document zoom levels) #32

Open
mvolkmann opened this issue Dec 24, 2018 · 8 comments
Open

Comments

@mvolkmann
Copy link

Lately I've noticed that for longer code snippets the placement of the insert cursor is off. It becomes unclear which line it is on. I suspect this is a CSS issue related to line height.

@iafan
Copy link
Owner

iafan commented Jan 1, 2019

What browser/OS do you experience this with? Does changing the browser fix the issue or not? Do you have a text snippet that would help reproduce the issue? If you could reduce the snippet to as few lines as possible, that would help as well.

Meanwhile, as a workaround, disabling syntax highlighting should fix the caret positioning issue.

@mvolkmann
Copy link
Author

mvolkmann commented Jan 1, 2019 via email

@zimnx
Copy link

zimnx commented Jan 25, 2019

selection_069
Simillar issue on Google Chrome on Linux v69.0.3497.100-1.
Not exactly between lines, but cursor is shifted when zoom is applied to site.
Above screenshot was taken on 75% zoom, on 100% zoom cursor matches line.

@iafan
Copy link
Owner

iafan commented Jan 25, 2019

@zimnx thanks! I can definitely see caret misalignment at 75% zoom level.

@mvolkmann, are you also using some custom zoom level?

@mvolkmann
Copy link
Author

I didn't realize I was at a custom zoom level, but it turns out I was at 90%. Switching to 100% fixed the issue.

Should the cursor be positioned correctly at any zoom level? On "The Go Playground" when I change the zoom level the cursor is still positioned correctly.

@iafan
Copy link
Owner

iafan commented Jan 25, 2019

Should the cursor be positioned correctly at any zoom level?

Oh yeah, for sure. So it's definitely a bug; I just wanted to make sure if it's the same kind of bug or a different one. :)

@iafan iafan changed the title input cursor between lines input cursor between lines (when using custom document zoom levels) Jan 25, 2019
@Streppel
Copy link

Streppel commented Jun 25, 2020

playbug

Same here

Firefox 77.0.1 (64-bit) running on Arch Linux 5.7.4-arch1-1

@ansiwen
Copy link

ansiwen commented Dec 2, 2020

Same problem here with Chrome on Fedora Linux and a custom font scaling. The issue is related to syntax highlighting, which increases the line height, but selected text and the cursor still use the original font height. Disabling the syntax highlighting lets the selected text be aligned again.(That has been mentioned above already.)

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

5 participants