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

IME input compatible #396

Closed
new-sankaku opened this issue Mar 18, 2024 · 6 comments
Closed

IME input compatible #396

new-sankaku opened this issue Mar 18, 2024 · 6 comments

Comments

@new-sankaku
Copy link
Contributor

new-sankaku commented Mar 18, 2024

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.

@viliusle
Copy link
Owner

viliusle commented Mar 19, 2024

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.
Or this is only case with extra events, causing issues for other developers?

Test string used:

第一行。
第二行。
最后一行

@new-sankaku
Copy link
Contributor Author

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.

@viliusle
Copy link
Owner

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.

viliusle added a commit that referenced this issue Mar 19, 2024
@viliusle
Copy link
Owner

English is fine. I included your PR manually (wanted to ignore dist/* files).
Thank you for PR.

@viliusle
Copy link
Owner

Pushed to live.

@new-sankaku
Copy link
Contributor Author

We passed each other.
I have confirmed that the PR has been approved.
Thank you for your response.

I have attached a video of before and after the modification.
Thank you for the quick response.

BEFORE

miniPaint.-.image.editor_Before_2024-03-20.05-00-42.mp4

AFTER

miniPaint.-.image.editor_After_2024-03-20.05-07-31.mp4

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

No branches or pull requests

2 participants