From 9c30427af92419928ac773c10921354e4de68d8a Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Tue, 3 Oct 2023 13:43:19 +0200 Subject: [PATCH] fixed: note shortcut --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 2ba0d80..a359a32 100644 --- a/main.js +++ b/main.js @@ -2545,11 +2545,12 @@ function mainkeydownhandler() var note = localdata.find(n => { var shortcut = n.content.match(/shortcut: (.*)/); - if (shortcut) + if (shortcut && shortcutmatches(event, shortcut[1])) { console.log("Loading note '" + n.title + "' from header shortcut " + shortcut[1]); + event.preventDefault(); loadnote(n.title); - return shortcutmatches(event, shortcut[1]); + return true; } return false; });