-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Compose(DESKTOP,JVM) 1.2.2 textfield Korean duplication #2600
Compose(DESKTOP,JVM) 1.2.2 textfield Korean duplication #2600
Comments
Answering my own workaround for this after some struggles.
I've tested this workaround, and seems to work ok. But, I hope there's a better support on compose's own TextField components. |
@June6-android what operating system, JDK distribution & system keyboard input setting do you use? |
Thanks for your support. I use |
Reproduced on Windows 10 with the Korean input keyboard.
Expected result: only typed text is shown. The issue is not present on macOS, but present on Windows. |
A simplified example that can be copy pasted:
|
Fixes JetBrains/compose-multiplatform#2600 1. We shouldn't skip input events with empty text, they will clear the current uncommitted text. In case of Korean, Swing will send a clear event of the previous char when we press Space, and send a separate "KEY_TYPED" event for the last character: - press q -> q uncommitted - press w -> commit q, w uncommitted - press Space -> discard committed text (event with empty text), send KEY_TYPED event with w and KEY_TYPED event with Space 2. Add tests for test input. I traced Swing events on each OS to mimic integration tests (It is difficult to write real input tests)
Fixes JetBrains/compose-multiplatform#2600 1. We shouldn't skip input events with empty text, they will clear the current uncommitted text. In case of Korean, Swing will send a clear event of the previous char when we press Space, and send a separate "KEY_TYPED" event for the last character: - press q -> q uncommitted - press w -> commit q, w uncommitted - press Space -> discard committed text (event with empty text), send KEY_TYPED event with w and KEY_TYPED event with Space 2. Add tests for test input. I traced Swing events on each OS to mimic integration tests (It is difficult to write real input tests)
Fixes JetBrains/compose-multiplatform#2600 1. We shouldn't skip input events with empty text, they will clear the current uncommitted text. In case of Korean, Swing will send a clear event of the previous char when we press Space, and send a separate "KEY_TYPED" event for the last character: - press q -> q uncommitted - press w -> commit q, w uncommitted - press Space -> discard committed text (event with empty text), send KEY_TYPED event with w and KEY_TYPED event with Space 2. Add tests for test input. I traced Swing events on each OS to mimic integration tests (It is difficult to write real input tests)
Fixes JetBrains#2600 1. We shouldn't skip input events with empty text, they will clear the current uncommitted text. In case of Korean, Swing will send a clear event of the previous char when we press Space, and send a separate "KEY_TYPED" event for the last character: - press q -> q uncommitted - press w -> commit q, w uncommitted - press Space -> discard committed text (event with empty text), send KEY_TYPED event with w and KEY_TYPED event with Space 2. Add tests for test input. I traced Swing events on each OS to mimic integration tests (It is difficult to write real input tests)
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
I'm implementing a simple search input field on Compose desktop.
My code looks as below.
This code will create a textfield which has 1 max lines. It works without any problem on english inputs. But when I type in Korean inputs, keys such as space, enter, or even numbers will duplicate the last Korean character. For example, in english, if I type in H, I, !, it will be HII!.
Is there some locale settings that can be done to the textField?
The text was updated successfully, but these errors were encountered: