ant-design-vue
ant-design-vue copied to clipboard
Using the textarea in the AutoComplete component, Every time the Chinese input method is activated, there are problems with the input.
- [ ] 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.
Uploading 20240305_174302.mp4…
As mentioned above, the issue arises from the word composition processing during Chinese input.
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.
#7391 pr already exists
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