-
Notifications
You must be signed in to change notification settings - Fork 644
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
IME input compatible #396
Comments
Can you help me to reproduce issue on live? I see that I need to use text tool and add Chinese text. But no luck so far. Test string used:
|
Are you asking for a test with Chinese input? I am a Japanese user, so I will install the Chinese language pack and check. By additional events, are you referring to the ones implemented in the Pull Request, such as compositionstart and compositionend? These events occur in languages that use an IME, so I believe the impact would be on users in those language regions. If this doesn't answer your question, please correct me. |
I mean is there simple way to reproduce this issue, so I can double check that your PR works? But if you are Japanese user, I will trust you and only double check English. No need to install Chinese language. |
English is fine. I included your PR manually (wanted to ignore dist/* files). |
Pushed to live. |
We passed each other. I have attached a video of before and after the modification. BEFORE miniPaint.-.image.editor_Before_2024-03-20.05-00-42.mp4AFTER miniPaint.-.image.editor_After_2024-03-20.05-07-31.mp4 |
I believe this is an excellent project!
The issue is as follows:
The text input needs to be compatible with IME string input.
Here's a brief overview of the problem:
For languages like English, strings are directly input into the Input field. However, for some languages (such as Japanese and Chinese), input is done through an IME. The IME treats the input string as a buffer. Since this buffer passes the entire string being input each time the input event is called, the current process results in the string being displayed in duplicate.
For example, when typing "ABC", the Input fires events for "A", "AB", "ABC". As a result, "AABABC" is entered on the screen (this example uses English characters for illustration purposes). This can be critical for countries that standardly use an IME.
The text was updated successfully, but these errors were encountered: