From 91059843ae9122bd547ddfdfa5a30edd99a42ff7 Mon Sep 17 00:00:00 2001 From: reagenzn Date: Sat, 2 Aug 2025 00:57:32 +0900 Subject: [PATCH] fix(search): prevent Enter key handling during IME composition (#2070) Add !e.isComposing check to Enter key handler in search functionality to prevent unwanted navigation during Japanese/Asian text input composition --- quartz/components/scripts/search.inline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quartz/components/scripts/search.inline.ts b/quartz/components/scripts/search.inline.ts index 27f74ec..28d47e9 100644 --- a/quartz/components/scripts/search.inline.ts +++ b/quartz/components/scripts/search.inline.ts @@ -220,7 +220,7 @@ async function setupSearch(searchElement: Element, currentSlug: FullSlug, data: // If search is active, then we will render the first result and display accordingly if (!container.classList.contains("active")) return - if (e.key === "Enter") { + if (e.key === "Enter" && !e.isComposing) { // If result has focus, navigate to that one, otherwise pick first result if (results.contains(document.activeElement)) { const active = document.activeElement as HTMLInputElement