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 IME issue when typing Vietnamese #2734

Closed
wants to merge 1 commit into from

Conversation

hdnha11
Copy link

@hdnha11 hdnha11 commented May 5, 2019

Is this adding or improving a feature or fixing a bug?

This is the bug when typing Vietnamese with macOS IME. Please take a look at the following video:

Vietnamese typing issue

When typing Vietnamese if the user finishes a word without whitespace or enter (no onCompositionEnd yet) and suddenly change the selection (onCompositionEnd occurred) then no text was inserted, but the view still displays the text which causes that text to disappear if the user does other edit commands (text input, bold,...).

Note: to type "tiếng Việt", turn on macOS Telex IME then type "tieesng Vieejt".

What's the new behavior?

User can input Vietnamese using macOS IME like this:

Fix Vietnamese typing issue

How does this change work?

Based on @yunwuxin work (fixed the cursor when typing and flashing when IME on) I add one more command insertText when onCompositionEnd occurred to explicitly sync the text in the view with the editor state.

Have you checked that...?

  • The new code matches the existing patterns and styles.
  • The tests pass with yarn test.
  • The linter passes with yarn lint. (Fix errors with yarn prettier.)
  • The relevant examples still work. (Run examples with yarn watch.)

Does this fix any issues or need any specific reviewers?

Based on the work of @yunwuxin in #2415

@hdnha11 hdnha11 force-pushed the bugfix/vietnamese-ime branch from d2d5ab2 to 067e851 Compare May 6, 2019 03:54
@akashdeep-sarin akashdeep-sarin mentioned this pull request Sep 9, 2019
2 tasks
@icarusysuper
Copy link

It seems that this PR will solve IME problem @ianstormtaylor

@minwe
Copy link

minwe commented Oct 29, 2019

Hi, @hdnha11 I'm tring to resolve Chinese IME problem with your approach.

It works, but it caused new problem:

  • Click CMD + B
  • Input some text with IME, it will insert duplicated text.

ime

Any idea about this?

@ianstormtaylor ianstormtaylor mentioned this pull request Nov 14, 2019
@arkee11
Copy link

arkee11 commented Nov 19, 2019

嗨,@ hdnha11我正努力用您的方法解决中文IME问题。

它有效,但是引起了新的问题:

  • 点击CMD + B
  • 使用IME输入一些文本,它将插入重复的文本。

我

有什么想法吗?
hi~遇到了同样的问题,请问有解决思路吗?

@ianstormtaylor
Copy link
Owner

Fixed by #3093.

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

Successfully merging this pull request may close these issues.

5 participants