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

iOS Japanese input behavior #430

Closed
lishid opened this issue Mar 16, 2021 · 4 comments
Closed

iOS Japanese input behavior #430

lishid opened this issue Mar 16, 2021 · 4 comments

Comments

@lishid
Copy link

@lishid lishid commented Mar 16, 2021

When the cursor is at the beginning of the line, composing Japanese characters on iOS's native Japanese keyboard causes the composed words to be moved to the beginning of the sentence.

Below is the relayed bug report. CodeMirror 6 - 0.18.0.

https://www.youtube.com/watch?v=_7Y6cP3Tbqw

  1. Type hiragana words “こんにちはせかい”, and then try to convert them to “こんにちは世界(hello world)”.
  2. When I finish the first conversion (in this case, こんにちは is not converted to kanji, but fixed as hiragana), the next word せかい moves to the beginning of the line, which messes up order of the words.
  3. Finally I converted せかい to 世界, which resulted in “世界こんにちは(world hello)”.

I confirmed this problem only in iOS default Japanese keyboards (Kana/Romaji). Microsoft IME on windows and at least one third-party iOS keyboard app(ATOK) seem not to cause this problem.

I don’t know why, but when there is any character right to the cursor, this problem doesn’t happen.

@ttakuru88
Copy link

@ttakuru88 ttakuru88 commented Mar 17, 2021

Similar #379 (comment)

@lishid
Copy link
Author

@lishid lishid commented Mar 17, 2021

Whoops good catch, totally forgot to check for dupes!

marijnh added a commit to codemirror/view that referenced this issue Mar 19, 2021
FIX: Fix an issue where, at the end of a specific type of composition on iOS,
the editor read the DOM before the browser was done updating it.

Issue codemirror/codemirror.next#430
Issue codemirror/codemirror.next#379
@marijnh
Copy link
Member

@marijnh marijnh commented Mar 19, 2021

Let's continue discussion in #379. I created a patch that solves at least one similar issue, but I wasn't able to follow the instructions you gave here (due to a lack of experience with the Japanese writing system).

@marijnh marijnh closed this Mar 19, 2021
@lishid
Copy link
Author

@lishid lishid commented Mar 19, 2021

I believe this is the same bug as #379 (comment) so your patch should be effective. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants