From 59dc8c4e7a0e59d2b58dd077f9f6286bc99816f3 Mon Sep 17 00:00:00 2001 From: claude-owner Date: Thu, 28 May 2026 19:21:19 +0900 Subject: [PATCH] =?UTF-8?q?fix(nav):=20Cmd/Ctrl+K=20=EB=8B=A8=EC=B6=95?= =?UTF-8?q?=ED=82=A4=EC=97=90=EB=8F=84=20isEditableTarget=20=EA=B0=80?= =?UTF-8?q?=EB=93=9C=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 리뷰어 지적: 주석엔 '다른 인풋/편집 영역에서 무시'라고 적어놨지만 실제 코드는 '/' 키에만 가드를 걸어둬서 Cmd/Ctrl+K 는 모든 input/textarea/contenteditable 에서 브라우저/편집기 단축키를 가로채는 상태였음. 수정: '/' 와 동일하게 !isEditableTarget(e.target) 조건 추가. 검색 인풋 자체에 포커스 중이면 어차피 focus()/setOpen(true) 가 noop 이라 UX 손해 없음. --- web/components/TopNav.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/components/TopNav.tsx b/web/components/TopNav.tsx index d77d48b..d6d6788 100644 --- a/web/components/TopNav.tsx +++ b/web/components/TopNav.tsx @@ -73,8 +73,13 @@ export function TopNav() { inputRef.current?.blur(); return; } - // Cmd/Ctrl+K — OS 공통 검색 단축키. - if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k") { + // Cmd/Ctrl+K — OS 공통 검색 단축키. 단, 다른 인풋/편집 영역에서 입력 중이면 + // 브라우저/편집기 단축키를 뺏지 않도록 동일하게 무시. + if ( + (e.metaKey || e.ctrlKey) && + e.key.toLowerCase() === "k" && + !isEditableTarget(e.target) + ) { e.preventDefault(); inputRef.current?.focus(); setOpen(true);