Several years later: The one weird CSS rule that causes the caret/cursor to be slightly out of place when clicking some text in the Glitch editor

I posted a bug report in 2018 describing how the caret doesn’t appear in the right place when clicking some text:

It seems like no big deal, but it’s surprisingly annoying. Another user agreed (in above-linked thread):

This is a major issue I have with glitch also - very frustrating as I often have to retype or edit as I have missed 1 character. It would be fantastic to fix this.

More than a year later I posted the solution:

It’s just a single rogue CSS rule:

.text-editor .CodeMirror-cursors, .text-editor .CodeMirror-line, .text-editor .CodeMirror-selected {
  transform: translateX(3px);

Admins were tagged in the thread, but it seems that after several years nothing has been done - perhaps it slipped through their notifications.

I’ve unfortunately mostly moved to replit now, but I was just back on glitch playing around with some old code and noticed that the bug hasn’t been fixed. So I thought I’d make another post as one last effort to try to get this fixed. It requires just deleting a single CSS rule, and there are no side-effects. Everything works fine when it is deleted.


Thanks for flagging this, @joe, and sorry it flew under our radar!! I just created a ticket and passed it on to the engineering team.