Disorienting flash of content + extra rendering during history nav with mode change

Steps to reproduce

  1. Open a large/complex file in edit mode (e.g. the “Start here” page in Help), then open another large/complex file in the same pane (e.g. “Format your notes” in Help).
  2. Switch the edit mode pane to preview mode
  3. Go back to the first file
  4. Go forward to the second file

Expected result

Navigating forward or back should display the correct note in the relevant mode, without an intermediate state.

Actual result

When going forward or back, the current file switches modes to match the mode you’re about to navigate to, and then loads the other file, creating a visible flicker and screen refresh that gives the impression you’ve moved through history twice instead of once.

(If you’re doing this in the Help vault, you’ll see the difference in how the two side-by-side panes behave: the pane where the mode stays the same will change once, but the pane where the history has different modes will change twice.)

Additionally, you may sometimes see the title bars flicker to display “No file” before they settle on their new value.


  • Operating system: Windows
  • Obsidian version: 0.11.9

Additional information

The sequence of events taking place is:

  1. MarkdownView.setState() calls setMode() to switch the mode
  2. setMode() hides the old mode and reveals the new mode
  3. setState() loads the file asynchronously, allowing the changes made by setMode() to be displayed while the file is loading

This could perhaps be resolved by allowing setMode() to accept a file argument, and load it into the new mode before hiding the old mode and displaying the new one, so as to avoid the double rendering and the disorienting flickers.

1 Like

fixed in 0.11.11

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