diff --git a/src/components/molecules/BlogSearch.astro b/src/components/molecules/BlogSearch.astro index c7b461e..d38b1e5 100644 --- a/src/components/molecules/BlogSearch.astro +++ b/src/components/molecules/BlogSearch.astro @@ -146,12 +146,14 @@ // contenteditable element). `Esc` while the input is focused clears the // query, blurs, and restores the full archive. document.addEventListener("keydown", (event) => { + if (event.isComposing) return; if (event.key === "/" && !event.metaKey && !event.ctrlKey && !event.altKey) { const target = event.target as HTMLElement | null; const tag = target?.tagName; const editable = tag === "INPUT" || tag === "TEXTAREA" || + tag === "SELECT" || target?.isContentEditable === true; if (!editable) { event.preventDefault();