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

Using the textarea in the AutoComplete component, Every time the Chinese input method is activated, there are problems with the input. #7403

Open
1 task
Odin-7 opened this issue Mar 5, 2024 · 4 comments

Comments

@Odin-7
Copy link

Odin-7 commented Mar 5, 2024

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

4.1.0

Environment

Google Chrome (121.0.6167.185)

Reproduction link

https://next.antdv.com/components/auto-complete-cn

Steps to reproduce

In version 4.1.2, there is an issue with input when using the textarea in the AutoComplete component. Every time the Chinese input method is activated, there are problems with the input.

What is expected?

The issue lies in word composition processing during Chinese input.

What is actually happening?

When entering Chinese, the input method progressively forms a complete Chinese character or word phrase through word composition processing. It waits for the user to confirm the input word or character before submitting it to the target element. When typing in English, each keystroke triggers an input event. The difference between these two scenarios requires special handling in the code.

@Odin-7
Copy link
Author

Odin-7 commented Mar 5, 2024

Uploading 20240305_174302.mp4…

As mentioned above, the issue arises from the word composition processing during Chinese input.

@Odin-7
Copy link
Author

Odin-7 commented Mar 5, 2024

image

By outputting the value of e.target.composing separately under English and Chinese input methods, it can be confirmed that the issue is indeed caused by the word composition process in Chinese input method.
The handleKeyPress event is not being triggered correctly in the Chinese input method state.

@selicens
Copy link
Member

selicens commented Mar 5, 2024

#7391 pr already exists

Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants