Skip to content

Commit 9105984

Browse files
authored
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
1 parent efddd79 commit 9105984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quartz/components/scripts/search.inline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ async function setupSearch(searchElement: Element, currentSlug: FullSlug, data:
220220

221221
// If search is active, then we will render the first result and display accordingly
222222
if (!container.classList.contains("active")) return
223-
if (e.key === "Enter") {
223+
if (e.key === "Enter" && !e.isComposing) {
224224
// If result has focus, navigate to that one, otherwise pick first result
225225
if (results.contains(document.activeElement)) {
226226
const active = document.activeElement as HTMLInputElement

0 commit comments

Comments
 (0)