From 6081a025584c05d9e7497d9e4c7829299c37befb Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Fri, 7 May 2021 14:41:31 +0200 Subject: [PATCH] Use MouseEvent instead of KeyboardEvent in WithShortcut * otherwise the disabled button will allow it to pass through --- ts/components/WithShortcut.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/components/WithShortcut.svelte b/ts/components/WithShortcut.svelte index aab7707a7..75c019435 100644 --- a/ts/components/WithShortcut.svelte +++ b/ts/components/WithShortcut.svelte @@ -19,7 +19,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const mounted: HTMLButtonElement = detail.button; deregister = registerShortcut( (event: KeyboardEvent) => { - mounted.dispatchEvent(new KeyboardEvent("click", event)); + mounted.dispatchEvent(new MouseEvent("click", event)); event.preventDefault(); }, shortcut,