When using certain IMEs (eg Japanese), one presses the return key many times during input to select the right word for the current input.
The search input and assistant chat thread interface seems to listen for keypress events of the return key to trigger sending the message. This means that hitting the return key to select a word in the Japanese IME prematurely submits the chat message.
Environment: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15
Steps to reproduce:
- open Kagi.com in macOS Safari or macOS Orion
- set input method to Japanese (Romaji)
- type query/message, which includes pressing enter to select word
Query/message shouldn't be submitted while IME word selection is active.
Probably should be fixed by listening for form submission instead of listening for enter key, so proper OS/browser behaviour is maintained where IMEs are involved.