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

fixed a problem with Japanese input being sent during IME input conversion #1

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

seigok
Copy link
Contributor

@seigok seigok commented Jul 23, 2024

When entering Japanese, users must perform a Kanji conversion operation. When the Enter key is pressed to select a candidate for Kanji conversion, it is also submitted even in the middle of a sentence. To avoid this problem, a state variable called isComposing is defined in the useState hook, and the state variable is changed in the onCompositionStart/End event handler. When this state is false, the state variable is included in the judgment statement of the onTextareaKeyDown event to prevent text input from being submitted in progress. This allows us to distinguish between a decision transmission and a decision to convert.

@spugachev
Copy link
Contributor

Great change!

@spugachev spugachev merged commit 372b8a6 into aws-samples:main Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants