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

Fix Chinese/Japanese keyboard typing #1030

Merged
merged 3 commits into from Oct 11, 2023
Merged

Fix Chinese/Japanese keyboard typing #1030

merged 3 commits into from Oct 11, 2023

Conversation

HollowMan6
Copy link
Collaborator

@HollowMan6 HollowMan6 commented Sep 29, 2023

  • Fix Chinese/Japanese keyboard typing in web page

Now Chinese/Japanese keyboard typing is broken when you try to type in web pages.

We should use postInputCommand to wait for the mComposingText to be updated before we updateCandidates, otherwise we won't have anything in mComposingText when we type our first letter, causing input candidates to not display at all.

  • Make Chinese keyboard able to type character by character

We shouldn't empty mComposingText each time when we finished displayComposingText

e.g. 测试一下
测 -> ce
试 -> shi
一 -> yi
下 -> xia

When we input ceshiyixia, after we choose 测试(ceshi), yixia shouldn't get dismissed and we should still be able to choose 一下(yixia)

Before: (quite annoying)

com.igalia.wolvic-20230929-204200.mp4

After: (the same behavior as most Chinese input methods)

com.igalia.wolvic-20230929-204338.mp4
  • Fix voice input when keyboard uses composing text

We don't want to compose text again when we use voice input, e.g. Voice input English while keyboard layout is Chinese.

Chinese/Japanese keyboard typing is broken when
you try to type in web pages

We should use postInputCommand to wait for the
mComposingText to be updated before we updateCandidates,
otherwise we won't have anything in mComposingText
when we type our first letter, causing input candidates
to not display at all.

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
We shouldn't empty mComposingText each time when we finished
displayComposingText

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
We don't want to compose text again when we use
voice input, e.g. Voice input English while keyboard
layout is Chinese.

Signed-off-by: Songlin Jiang <sjiang@igalia.com>
@HollowMan6
Copy link
Collaborator Author

@felipeerias @svillar @javifernandez Any review on this PR? This PR actually contains important fixes for the keyboards that compose text to input and I believe this should be treated with high priority.

@svillar
Copy link
Member

svillar commented Oct 10, 2023

@felipeerias @svillar @javifernandez Any review on this PR? This PR actually contains important fixes for the keyboards that compose text to input and I believe this should be treated with high priority.

I'll try to review next week. I haven't reviewed it before because I know that code was modified for the chromium backend so I need to verify that the patch does not break the chromium backend.

As my knowledge of JCK is null I'd need assistance to verify that precisely we don't regress the chromium backend

Copy link
Member

@javifernandez javifernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW the bug is also reproducible using the Chromium backend.
The change looks good and it works as expected in both, Gecko and Chromium backends.

Thanks.

@javifernandez javifernandez merged commit b9a484a into main Oct 11, 2023
18 checks passed
@javifernandez javifernandez deleted the input-method branch October 11, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants