-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
On macOS, when using Chinese input method (or other IME), pressing Enter to confirm English input incorrectly triggers message sending instead of completing the IME composition.
Steps to Reproduce (macOS)
- Switch to Chinese input method on macOS
- Start typing an English word in the chat input (e.g., "pointer")
- Press Enter to confirm the English input
- Expected: Input method confirms and inserts "pointer"
- Actual: Message is sent prematurely before finishing the sentence
Example Scenario
When typing "介绍一下pointer是什么":
- Type "介绍一下pointer"
- Press Enter to confirm "pointer"
- Message sends immediately with incomplete text, missing "是什么"
Expected Behavior
- Enter key should complete IME composition first
- Message should only be sent when Enter is pressed outside of IME composition state
Current Behavior
The input field's onKeyDown handler doesn't check for IME composition state, causing Enter key events to trigger onSend() even during active composition.
Environment
- Platform: macOS (also affects other platforms with IME support)
- Input Method: Chinese, Japanese
Metadata
Metadata
Assignees
Labels
No labels