mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
Use MouseEvent instead of KeyboardEvent in WithShortcut
* otherwise the disabled button will allow it to pass through
This commit is contained in:
parent
9e747a5744
commit
6081a02558
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue