fix: mousehover keys can be set blank

This commit is contained in:
Gabe
2025-09-25 00:21:51 +08:00
parent 2a46939aa5
commit 261f29c185
4 changed files with 29 additions and 15 deletions

View File

@@ -48,7 +48,7 @@ export const shortcutRegister = (targetKeys = [], fn, target = document) => {
const targetKeySet = new Set(targetKeys);
const onKeyDown = (pressedKeys, event) => {
if (targetKeySet.size > 0 && isSameSet(targetKeySet, pressedKeys)) {
if (isSameSet(targetKeySet, pressedKeys)) {
event.preventDefault();
event.stopPropagation();
fn();