When using the Chinese IME in Safari, the enter key ignores the character selection state and submits directly.
I think this is likely a bug in Safari because it cannot detemine the state of character selection.
However for now, this issue can be temporarily fixed using a Userscript like this:
document.addEventListener("keydown", (e) => {
if(e.keyCode == 229) e.stopPropagation();
}, true)
Also, this bug may be related to this issue
Step to reproduce:
- Using Safari browser on macOS, this problem does not occur in browsers such as Firefox or Chrome
- Set input method to Chinese, Traditional (Zhuyin)
- Type text into the search box, pressing enter should logically end the character selection state, but Safari browser interprets it as entering the next step
The temporary solution is as follows:
- Download any Userscript editor for Safari, e.g. Userscript
- Add the following script
// ==UserScript==
// @name Fix Chinese IME for Kagi Search on Safari
// @description The first press of the enter should end the character selection state
// @match https://kagi.com/*
// @version 1.0.0.0
// ==/UserScript==
document.addEventListener("keydown", (e) => {
if(e.keyCode == 229) e.stopPropagation();
}, true)
- Done
Once again, I believe this bug is related to Safari's logic determination.
However, it is quite troublesome for Chinese users.
I hope the above is helpful for the improvement of product.
Thank you and have a nice day!
When entering text in the search box using Chinese input method.
The first press of the enter key should end the character selection state, not submit directly.