-
Notifications
You must be signed in to change notification settings - Fork 0
[Bug]: Textarea submits input on Enter key during IME composition #73
Description
Platform
macOS
Operating system version
26.2(25C56)
System architecture
ARM64 (M1, M2, etc)
PolyScope Version
0.13.0
Bug description
When typing in the textarea using an IME (Input Method Editor), pressing the Enter key to confirm a candidate selection unexpectedly triggers form submission instead of only completing the character composition.
Steps to Reproduce:
Focus on the textarea input field.
Switch to an IME-based input method (e.g., Traditional Chinese, Japanese, Korean, or any other language that requires an IME for character composition).
Type a sequence that opens the candidate list.
Press Enter to select a candidate.
Expected Behavior:
Pressing Enter during an active IME composition session should only confirm the selected candidate character. The textarea should not submit or send the input content at this point.
Actual Behavior:
Pressing Enter both confirms the candidate selection and simultaneously triggers submission of the input, even though the user has not finished composing their message.
Suggested Fix:
Check the isComposing property of the KeyboardEvent, or listen for compositionstart / compositionend events to distinguish between IME composition input and regular key presses. During an active composition session, the Enter key event should be suppressed from triggering submission.
Steps to reproduce
No response