fix(脑图): 空格快捷键禁止在输入框内使用

This commit is contained in:
baiqi 2024-11-26 11:02:56 +08:00 committed by 刘瑞斌
parent d1f635f6b7
commit 8834835aa1
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,10 @@ export default function useShortCut(shortcuts: Shortcuts, options: MinderOperati
}; };
const handleShortcutInput = (event: KeyboardEvent) => { const handleShortcutInput = (event: KeyboardEvent) => {
if ((event.target as HTMLElement)?.tagName?.toLowerCase() === 'input') {
// 输入框中不响应快捷键
return;
}
const { editor } = window; const { editor } = window;
const { fsm } = editor; const { fsm } = editor;
const state = fsm.state(); const state = fsm.state();