fix(hotkeys): tree not using the right API

This commit is contained in:
Elian Doran 2025-07-30 14:15:29 +03:00
parent 2ef9009384
commit 97fb273e7f
No known key found for this signature in database

View File

@ -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.
});
}