Edit/Preview layout state lost during routine operations

Go here for repro steps: https://forum.obsidian.md/t/edited-edit-preview-layout-lost-upon-going-back-from-image/7838/5

Repros

Environment

  • Operating system: macOS 11.2.2
  • Obsidian version: 0.11.4 (also affects all previous versions to date)

Issue

My primary mode of working in Obsidian is 2-pane split view, with editor on left, and preview on right (linked panes). Quite often the view is not remembering that layout. It can happen when switching between notes, or after quitting and later re-launching.

Some scenarios (#1 is the most common for me and is kind of frustrating).

  1. Both panes get turned into “editors” or “previews” - instead of one for each
  2. Right pane gets closed, leaving single edit pane only
  3. Panes get unlinked

Is this a known issue? Anything I can check/do to prevent it from happening? (Even a URI scheme to rapidly switch back to my preferred view would go a long way towards helping this, since I could tie that to an Alfred hotkey for quickly resetting the view.)

1 Like

can you provide some reproducible steps?

I wish I could. yes, see post below. It happens a lot (just happened a few minutes ago…) but it seems pretty random. I posted here in hopes that it’s not “just me” and others will chime in.

@WhiteNoise I upgraded to the insider track. Still seeing this happen on 0.9.10 (randomly). Really wish I could find a reliable way to reproduce. Has anyone else reported this? I usually launch Obsidian via the obsidian:// URL scheme- could that be the cause? I know there are some bugs there… (figured out repro steps)

@WhiteNoise Aha! Found it (well, at least 1…)

  1. start in dual-pane layout. Edit on left, Preview on right.
  2. in the File Explorer, click on an attachment e.g. a PNG file.
  3. both panes will display the PNG
  4. click back on your original note.
  5. voila, both panes are now in Edit mode… :frowning:

What should happen (imo):
either of these would be good

  • in step 3 above, only the right-side (Preview) pane should show the PNG. If there is no Preview pane visible when the user clicks the PNG, then open a new preview pane to display it.
    ~ or~
  • remember the layout from before clicking the PNG, and restore it when the user clicks back onto an .md file.

edit-> another repro path below

On 0.9.20 now, this bug still persists. Getting to be a little annoying. Is it on the roadmap to be fixed? @WhiteNoise

no, ETAs. Sorry.

Found another easy path to repro this bug:

  1. Open a file in dual-pane view (one edit, one preview)
  2. From Obsidian’s ‘…’ menu, choose Delete file
  3. Both panes now show a ‘No file is open’ message
  4. Click on any other note
  5. The preview is gone, both panes are in edit mode :frowning:

Steps to reproduce

  1. Open a note in the editor.
  2. Open a linked preview pane.
  3. Delete the note in File Explorer.
  4. Click on another note in File explorer.

Expected result

Clicked note opens in both editor and preview pane for editing and previewing respectively.

Actual result

Note opens up for editing in both panes.

Environment

  • Operating system: Ubuntu 20.04 LTS
  • Obsidian version: 0.6.5
  • Using custom CSS: No.

Additional information

Sometimes rather than the described behavior above, the Linked Preview Pane would not open the file at all.

ok, I can reproduce what you describe.
I agree it can be annoying.

2 Likes

@WhiteNoise I see this got merged with another similar old thread. Is this one on the roadmap yet? I note it’s still broken as of 0.10.5.

1 Like

I can confirm this issue,

Environment:
Windows 10
Obsidian v0.12.10

Steps to reproduce:

  • set up one pane for editing and one pane for viewing and one pane for graph view.
  • pin the graph view
  • set the edit and preview pane to be linked.
  • choose a node in graph view
  • delete the node from the edit pane “More options”-context menu

Now both edit and preview panes are set “No file is open”-view/pane, and when clicking another node in the graph both of them will show the edit view.

Could it be so that the “No file open”-pane doesn’t have the setting/attribute of linking so that this data gets “lost” after a node is deleted?

With Ctrl pressed, clicking the button for preview mode will enter the split preview mode, with the left side in edit mode and the right side in preview mode, and the notes on both sides are synchronized.

Use Alt+Enter to enter any other note this mode will be maintained.

However, if you enter the picture, then the edit mode on the left will change to preview mode, and then use Ctrl+Alt+Left to return, then both sides will all change to edit mode again.

This creates a great inconvenience for use.

Current version: v0.12.19

Windows

Is this a new bug or has it always happened?

1 Like

Sorry, I just started using this feature recently, so I don’t know when it was introduced, but I tested it in the virtual machine to make sure it wasn’t caused by my own extension or other programs.

很抱歉,我最近才开始使用这个功能,所以我不清楚它是什么时候被引入的,但是我在虚拟机中进行了测试,确保这不是由于自己的扩展或者是其他什么程序造成的。

This is definitely not a new bug…

1 Like

I see.It seems that I am not the only one troubled by this problem. really interferes with the use.