goplayspace icon indicating copy to clipboard operation
goplayspace copied to clipboard

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

Open mvolkmann opened this issue 6 years ago • 8 comments

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.

mvolkmann avatar Dec 24 '18 16:12 mvolkmann

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.

iafan avatar Jan 01 '19 05:01 iafan

On Mon, Dec 31, 2018 at 11:59 PM Igor Afanasyev [email protected] wrote:

What browser/OS do you experience this with?

Chrome on macOS

Does changing the browser fix the issue or not?

Yes! I cannot reproduce the issue in Firefox or Safari.

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.

The specific text doesn't seem to matter. As long as there 25 lines or more, I can reproduce the problem.

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

Yes, that works. Of course I really like to use syntax highlighting. ;-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iafan/goplayspace/issues/32#issuecomment-450711478, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE10DgTdMKQ916PoFEX4F0Tbl0yAoPrks5u-vk4gaJpZM4ZglAR .

-- R. Mark Volkmann Object Computing, Inc.

mvolkmann avatar Jan 01 '19 20:01 mvolkmann

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.

zimnx avatar Jan 25 '19 10:01 zimnx

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

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

iafan avatar Jan 25 '19 16:01 iafan

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.

mvolkmann avatar Jan 25 '19 17:01 mvolkmann

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 avatar Jan 25 '19 19:01 iafan

playbug

Same here

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

Streppel avatar Jun 25 '20 22:06 Streppel

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.)

ansiwen avatar Dec 02 '20 13:12 ansiwen