From 754b16af101653c21aaf6e30ea9f2654667a3bb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Tue, 16 Jan 2024 11:19:43 -0600 Subject: [PATCH] fix: focused element disallow shell switch --- src/app/tools/tankopedia/[id]/page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/tools/tankopedia/[id]/page.tsx b/src/app/tools/tankopedia/[id]/page.tsx index 2cb81dc59..39f45626f 100644 --- a/src/app/tools/tankopedia/[id]/page.tsx +++ b/src/app/tools/tankopedia/[id]/page.tsx @@ -42,6 +42,8 @@ export default function Page({ params }: { params: { id: string } }) { }); function handleKeyDown(event: KeyboardEvent) { + if (document.activeElement instanceof HTMLInputElement) return; + if (event.key === '1') { setDuel( produce((draft) => {