Cursor position is in the wrong place after .css margin changes

What I want to get

I wanted to use css’s margin command in order to have more space around headings.

Steps to reproduce

  1. Make sure that the legacy mode is on and you are editing the file.
  2. Create a bunch of h1-h3 headers and walls of text in between.
  3. Open Developer Console by pressing Ctrl+Shift+I.
  4. Add the following CSS code:
.HyperMD-header-1, .HyperMD-header-2, .HyperMD-header-3 {
    margin: 40px !important;
}

To illustrate the margins that were created:


4. Bug: Now click on text and see that the visual place of the cursor differs from the actual editing place:

Environment

  • Operating system: Linux Mint 20.2 Cinnamon
  • Obsidian: the latest v0.13.19
  • Tested in Help Vault

Two things. CSS questions are better handled in #help on in the appearance channel on discord.

The legacy editor will be deprecated at some point so it’s unlikely that bugs in it will be fixed.

  1. Good to know, thank you.
  2. Good to know this as well, thanks. Since I don’t use the new mode, I don’t know if a similar bug exists in there. I reported the bug that bothers me; there might be complications for other people as well.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.