Window scrolls when navigating to new page

This issue appears with all plugins disabled and obsidian in safe mode.

Editor Note: Just so people don’t get the wrong idea. This is not a CSS issue. It’s present using a vanilla install. It just can’t be seen noticed without making a small CSS change.

/*Allow workspace to have a scrollbar*/
.mod-root.workspace-split.mod-vertical {

/*force each page to a 500px minimum width*/
    min-width: 500px;

Original Post
All of the css based sliding panes code broke when the editor changed. (It’s possible the new editor itself didn’t break it but an update later on did. I’ve not used obsidian since a bit before the editor change so idk the exact moment it broke)

Anyways the issue is small but quickly becomes a major headache. I’ll use images to better display the issue.

So take this image. It is comprised of 4 panes side by side. The leftmost pane is collapsed so you only see it’s header.

Now I’m going to click the games index in the rightmost pane

As you can see it navigated to the games index but it also scrolled the panes over roughly 250px.

This scrolling behavior happens in preview mode, live preview mode, and edit mode. This behavior does not happen when I enter legacy editor mode. Whatever is causing this doesn’t seem to be directly linked to the live preview mode. As far as I can tell some sort of javascript is causing this issue. I don’t think it’s something I can fix by updating my CSS.

I highly suspect there should be a way to fix this behavior without negatively affecting the new editor. This bug happens with the default CSS theme too but because it doesn’t have an overflow scrollbar you don’t notice it happening.

Using the sliding panes plugin is not an option because I have custom advanced sliding panes CSS that add extra functionality not present in the sliding panes plugin. Not to mention this bug can, and probably does affect other themes.

Steps to reproduce

  1. Install my faded CSS theme
    • can also be seen using Ars Magna Theme
    • can also be seen by adding this snippet to the default theme
      .mod-root.workspace-split.mod-vertical {
          min-width: 500px;
  2. Open multiple pages until the content overflows and you get a scrollbar at the bottom
  3. scroll all the way to the rightmost pane and click to navigate new page using a page link. You will notice the screen scrolls over to the left.

PS: ctrl+click will cause the same problem but it scrolls to the right.

Expected result

It should just open without scrolling the page/window.

Actual result

page/window scrolls when clicking page link


Windows 10
Obsidian v0.13.23

Additional information

I am reluctant to take css issues as bugs. I think it’s better you discuss about this in #appearence and the other dev channels on discord.

As I mentioned I wouldn’t really consider it a CSS issue. The issue itself is not CSS-related nor can it be fixed by CSS.

Obsidian is obviously trying to do so sort of navigation that doesn’t make sense. The default theme doesn’t allow the workspace to scroll which means the issue does occur on the default theme but in the end, it’s not obvious because it moves 0px since there’s nowhere for it to move.

Furthermore, since the default theme doesn’t contain a scrollable workspace it means whatever code is causing it to scroll is not providing utility to the default theme.

Hence this is a bug that just happens to only be obviously visible when css is used to make the workspace scrollable. Putting this topic under appearance will likely only cause it to become hidden in a sea of CSS discussions of how to do XYZ.

As of Obsidian Version 0.14.6 this issue is still present. I would really love for this to be fixed as it, unfortunately, makes my custom theme borderline unusable and directly affects all other themes that modify the CSS to allow for the main workspace to be scrollable.

A very minor and useful CSS change which I think should be supported. Not to mention it seems extremely unlikely that removing this scrolling behavior would have any negative effects to the default obsidian theme since the default theme can’t scroll to begin with.

I hope the devs look into this.