From 8834835aa18449014d9f9db9222a2ec93aecc5a7 Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 26 Nov 2024 11:02:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=84=91=E5=9B=BE):=20=E7=A9=BA=E6=A0=BC?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E9=94=AE=E7=A6=81=E6=AD=A2=E5=9C=A8=E8=BE=93?= =?UTF-8?q?=E5=85=A5=E6=A1=86=E5=86=85=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/pure/ms-minder-editor/hooks/useShortCut.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts b/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts index 94c97e29c7..00340db30b 100644 --- a/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts +++ b/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts @@ -98,6 +98,10 @@ export default function useShortCut(shortcuts: Shortcuts, options: MinderOperati }; const handleShortcutInput = (event: KeyboardEvent) => { + if ((event.target as HTMLElement)?.tagName?.toLowerCase() === 'input') { + // 输入框中不响应快捷键 + return; + } const { editor } = window; const { fsm } = editor; const state = fsm.state();