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
| | |
| | | |
| | | // 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 |