Skip to content

Build your personal knowledge base with Trilium Notes

fix(hotkeys): tree not using the right API

Elian Doran97fb273e7f80
diff --git a/apps/client/src/widgets/note_tree.ts b/apps/client/src/widgets/note_tree.ts
index 3b9367f1f7..d6dd4d7338 100644
--- a/apps/client/src/widgets/note_tree.ts
+++ b/apps/client/src/widgets/note_tree.ts
@@ -727,9 +727,9 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
for (const key in hotKeys) {
const handler = hotKeys[key];
- $(this.tree.$container).on("keydown", null, key, (evt) => {
+ shortcutService.bindElShortcut($(this.tree.$container), key, () => {
const node = this.tree.getActiveNode();
- return handler(node, evt);
+ return handler(node, {} as JQuery.KeyDownEvent);
// return false from the handler will stop default handling.
});
}