Hi Kagi Teams, I found a bug where focus is lost from the search bar when confirming Japanese characters with the Enter key (Japanese IME).
English works well
Loses focus when a conversion candidate is confirmed in Japanese input
Environment:
OS: macOS 26.4
Browser: [Chrome 147.0 / Safari 26.4 など]
Cause:
In k_serp.js, the handleKeyPress function explicitly calls searchBox.blur() when the Enter key is pressed, but it doesn't check if the user is still in the middle of IME composition.
Expectation:
The focus should remain in the search bar after pressing the Enter key to confirm Japanese IME conversion.
/ From k_serp.js
finishedTyping(document.getElementById("searchBar").value),
requestAnimationFrame( () => searchBox.blur()); // This is the cause break;
Proposed Fix:
if (!event.isComposing) {
requestAnimationFrame( () => searchBox.blur());
}