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 {
overflow-x:auto
}
/*force each page to a 500px minimum width*/
.workspace-leaf{
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
- 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 { overflow-x:auto } .workspace-leaf{ min-width: 500px; }
- Open multiple pages until the content overflows and you get a scrollbar at the bottom
- 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
Environment
Windows 10
Obsidian v0.13.23