Toggle checklist status in sidebar toggles the wrong file

Steps to reproduce

  1. Create a new text file in Edit mode, and drag the file into the sidebar (I used the right sidebar).
  2. Click inside the file’s pane in the sidebar to move focus to that file.
  3. Type something.
  4. Press command-Enter (or whatever shortcut you have for the “Toggle Checklist Status” command).

Expected result

The checklist status of the current line in the focussed file is toggled – switching between a regular item, a checklist item, and a completed checklist item.

Actual result

The checklist status of the current line of the file in the middle pane is toggled, even though the cursor is in the sidebar pane and typing correctly inserts text into the file in the sidebar.

Environment

  • Operating system: Mac OS X version 11.6.1
  • Obsidian version: 0.13.6

Additional information

This happens even if the central pane is in preview mode, which looks quite weird. This bug makes it impossible to use the “toggle checkbox status” command in the sidebar – the only workaround is to load the file into the central pane and use the command there.

Note that this bug has been in Obsidian for months…it’s just annoyed me enough to finally log a bug report for it (it’s not new).