Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enter key interrupts IME composition in MessageInput component #443

Open
minai621 opened this issue Oct 30, 2024 · 0 comments · May be fixed by #444
Open

Enter key interrupts IME composition in MessageInput component #443

minai621 opened this issue Oct 30, 2024 · 0 comments · May be fixed by #444
Labels
bug Something isn't working

Comments

@minai621
Copy link

Describe the bug
When using the MessageInput component to enter text with an Input Method Editor (IME) for languages like Korean, pressing the Enter key during text composition prematurely ends the composition. This results in incomplete characters or unintended behavior, leaving residual characters in the input field.

To Reproduce
Steps to reproduce the behavior:

Navigate to the page containing the MessageInput component.
Click on the input area to focus it.
Switch your keyboard input method to a language that uses IME (e.g., Korean, Chinese, or Japanese).
Begin typing characters that require composition (e.g., Korean syllables).
While still composing (before finalizing the character), press the Enter key.
Observe that the composition is interrupted, and incomplete characters remain in the input field.
Expected behavior

Pressing the Enter key during IME composition should not interrupt the composition process. The character composition should complete normally, and the Enter key should only submit the message after the composition has ended.

Screenshots

2024-10-30.4.34.22.mov

Additional context

This issue occurs because the onKeyDown event handler does not account for the IME composition state. The Enter key event should be ignored while the user is in the middle of composing text with an IME.

@minai621 minai621 added the bug Something isn't working label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant