Wrong cursor position after change in CSS

Bug report

I wanted more space between the text and the borders in the editor view, so I went to the styles.less file in my %APPDATA%\inkdrop\ folder on Windows and added this piece of code:

.CodeMirror-code {
    padding: 1.5em;
}

After this, the position of the cursor in the editor view is messed-up; it is entirely wrong, and it makes it impossible to write or modify anything.

Info

  • Platform: Windows
  • Platform version: 10
  • App Version: 5.3.1

Reproduce

  • Go to %APPDATA%\inkdrop\ and open or create the styles.less file.
  • Add the CSS code above.
  • Go back to the editor and try to edit an existing note.

Hi VGB,

I guess you want to make a gap between the gutter and the text lines.
The gutter is placed inside .CodeMirror-code, so it won’t work.

This should work:

.CodeMirror pre.CodeMirror-line {
  padding-left: 1.5em;
}

Result:

Screen Shot 2021-07-26 at 15.30.25

Sorry, but it doesn’t seem to be working totally OK.

See the attached image, after adding the following code to the styles.less file.

.CodeMirror pre.CodeMirror-line {
  padding-left: 3em; /* Big, just as an example */
}

How about this:

.CodeMirror .CodeMirror-scroll {
  padding-left: 3em; /* Big, just as an example */
}