fix: disable preventDefault in shrotcut
This commit is contained in:
@@ -63,7 +63,7 @@ export const shortcutRegister = (targetKeys = [], fn, target = document) => {
|
|||||||
const targetKeySet = new Set(targetKeys);
|
const targetKeySet = new Set(targetKeys);
|
||||||
const onKeyDown = (pressedKeys, event) => {
|
const onKeyDown = (pressedKeys, event) => {
|
||||||
if (isSameSet(targetKeySet, pressedKeys)) {
|
if (isSameSet(targetKeySet, pressedKeys)) {
|
||||||
event.preventDefault();
|
// event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
fn();
|
fn();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user