leader-hotkeys-obsidian icon indicating copy to clipboard operation
leader-hotkeys-obsidian copied to clipboard

Command doesn't activate if a side panel has the focus

Open Randy-Astle opened this issue 2 years ago • 1 comments

Describe the bug Even though the breadcrumb is displayed in the title bar, if a side panel has the focus, the command isn't invoked.

To Reproduce Steps to reproduce the behavior:

  1. Open a note
  2. Click on a side panel
  3. Attempt to activate a command using the mapped key(s) (The Command Palette functions when a side panel has the focus.)

Expected behavior A clear and concise description of what you expected to happen.

Screenshots N/A

Desktop (please complete the following information):

  • OS: Windows 10
  • Obsidian Version: v0.14.5
  • Leader Hotkeys Version: 0.2.0
  • Editor | Vim key bindings enabled

Additional context N/A

Randy-Astle avatar Apr 05 '22 16:04 Randy-Astle

Indeed, this is a limitation of the current design ( Last update ) . In order to implement the functionality, its necessary to completely bypass the native shortcut handler. This means that we directly inject a listener on the document and due to the ways javascript event-bubbing works, the native shortcut handler is called before our own.

canelhasmateus avatar Apr 18 '22 13:04 canelhasmateus