From 10c417808b8f65e6b1f1d92d3d896947bb69569b Mon Sep 17 00:00:00 2001 From: codetypes Date: Thu, 8 May 2025 18:34:59 +0800 Subject: [PATCH] fix hotkey conflict with input element --- src/components/workspace.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/workspace.tsx b/src/components/workspace.tsx index 845a3d9..ab7c8c4 100644 --- a/src/components/workspace.tsx +++ b/src/components/workspace.tsx @@ -117,6 +117,9 @@ export const Workspace: FC = () => { ], keysRef, (e, key) => { + if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) { + return; + } e.preventDefault(); e.stopImmediatePropagation(); e.stopPropagation();