1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-24 08:12:24 +02:00

Desktop: Fix ctrl/cmd-n can create new notes while the trash folder is selected (#11092)

This commit is contained in:
Henry Heino 2024-09-21 04:57:48 -07:00 committed by GitHub
parent 8c4bf057d6
commit d023ce592c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,6 +27,10 @@ const useKeymap = (editorControl: CodeMirrorControl) => {
binding.accelerator, CodeMirrorVersion.CodeMirror6,
),
run: () => {
if (!CommandService.instance().isEnabled(binding.command)) {
return false;
}
void CommandService.instance().execute(binding.command);
return true;
},