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

Deletion on Android IME re-propigates previous composition #4173

Closed
ink404 opened this issue Oct 3, 2022 · 3 comments
Closed

Deletion on Android IME re-propigates previous composition #4173

ink404 opened this issue Oct 3, 2022 · 3 comments

Comments

@ink404
Copy link
Contributor

ink404 commented Oct 3, 2022

After completing a composition on Android devices deleting re-triggers a composition and propagates the input with the old composition text. (see video below).

I was able to achieve the desired behavior by clearing the _textarea (by calling _textarea.value = '';) when compositions are finalized in CompositionHelper here: https://github.com/xtermjs/xterm.js/blob/master/src/browser/input/CompositionHelper.ts#L171.

Unfortunately this breaks the following test cases for Korean.

 1) CompositionHelper
       Input
         Should insert simple characters:

      Uncaught AssertionError: expected 'ㅇㅇㅇ' to equal 'ㅇㅇ'
      + expected - actual

      -ㅇㅇㅇ
      +ㅇㅇ
      
      at Timeout._onTimeout (src/browser/input/CompositionHelper.test.ts:65:22)
      at listOnTimeout (node:internal/timers:557:17)
      at processTimers (node:internal/timers:500:7)

  2) CompositionHelper
       Input
         Should insert complex characters:

      Uncaught AssertionError: expected '앙앙앙' to equal '앙앙'
      + expected - actual

      -앙앙앙
      +앙앙
      
      at Timeout._onTimeout (src/browser/input/CompositionHelper.test.ts:101:30)
      at listOnTimeout (node:internal/timers:557:17)
      at processTimers (node:internal/timers:500:7)

  3) CompositionHelper
       Input
         Should insert complex characters that change with following character:

      Uncaught AssertionError: expected '아' to equal '아아'
      + expected - actual

      -아
      +아아
      
      at Timeout._onTimeout (src/browser/input/CompositionHelper.test.ts:133:24)
      at listOnTimeout (node:internal/timers:557:17)
      at processTimers (node:internal/timers:500:7)

Details

  • Browser and browser version: Chrome, 106.x
  • OS version: Android 13, GBoard
  • xterm.js version: 5.x

Steps to reproduce

  1. type 'a'
  2. tap space (finishes composition)
  3. tap delete
  4. Observe there are two a's now
Video:
xterm-repro.mp4
@ink404
Copy link
Contributor Author

ink404 commented Oct 19, 2022

@Tyriar If you have any suggestions for what changes to make to solve this I'm happy to make a PR, also please let me know if there's any additional information I can provide that would make this easier to debug.

@RahjIII
Copy link

RahjIII commented Nov 2, 2022

I'll add that this has been a serious ongoing issue, as standard English text entry through Android IME keyboard is almost unusable in current xtermjs. Any backspace seems to break the user's intended input.

Related PRs #3600 , #4007

@Tyriar
Copy link
Member

Tyriar commented Dec 1, 2022

/duplicate #3600

@Tyriar Tyriar closed this as completed Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants