[BUG] Line Numbers in the Gutter Not Aligning With Text in Editor Mode

While editing a document in Obsidian, the line numbers begin to glitch out along long-form paragraphs with varied indentation across bullet lists, headings, and numbered lists in what appears to be varied combinations. Text will align properly with the line numbers while scrolling to the top of the page, and as I scroll down will quickly shift out of line. Any text which goes beyond where the line numbers display is unable to be properly interacted with, jumping the curser either to the end of the paragraph or the final line that sits still within the margin numbers.

Steps to reproduce

  1. Open a new document in a fresh vault
  2. type

    and place any text of choice between the tag
  3. Take paragraphs of 200+ words each and paste them into the document. Should each be spaced by 1 line in between.
  4. The document should be 2000+ words.
  5. Scroll to the bottom at any pace.

Expected result

A plain page, with the page numbers aligning with where the text has been placed upon a new line.

Actual result

At some point towards the middle of the text (or in longer documents, anywhere past line 15 to 25ish) the margin numbers to the left suddenly shift to become unaligned with the text. Additionally, any text which no longer fits the bounds of where the line numbers sit can no longer be properly interacted with.

Environment

  • Operating system: Google Chrome OS, Version 101.0.4918.0 (Official Build) dev (32-bit)
  • Debug info:

Additional information

1 Like

Please, post a screen recording of this happening in the help vault and attach a file that reproduces the issue.

Ok, that is a mobile version of obsidian running on chromebook. Does it happen on Windows or Mac?

I have been dealing with this issue for a few weeks now and attempted to recreate it on my Windows PC to no avail. I would like to note that uninstalling Obsidian, deleting the .Obsidian files for this vault, and even power washing my Chromebook have done nothing to fix the issue.

The video shown was done on a fresh vault, with a fresh new file. The text used was copy-pasted from my DnD notes in another vault.

If you have an android phone, does it happen there?

What’s your obsidian mobile version on the chromebook?

Current Version: 1.1.0 (38)
API v0.13.24
I was able to recreate the glitch on my android phone.

thanks

Same issue ipadOS Obsidian 1.4.1 Beta

can anybody attach a document where this happens?

is this still happening?

1 Like

Phew, I thought I was the only one having this problem - and yes, it’s an ongoing bug unfortunately :frowning:

Just have a look, it’s all messed up (after restart it shows just fine until you start editing the file again)

Stumbled upon this after a Google search for this exact problem, and thought I’d share my solution in-case it’s useful to anyone…

My misaligned line numbers were due to custom CSS I had written and enabled. Navigating to Settings > Appearance > CSS Snippets should expose any custom CSS you have. Mine wasn’t all that necessary so I just disabled it.

It’s also possible a plugin you’ve installed is causing the behavior. To identify the plugin in question, you would have to disable all of them and then add them back one-by-one until the behavior occurs again.

1 Like

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