superlistapp / super_editor

A Flutter toolkit for building document editors and readers
https://superlist.com/SuperEditor/
MIT License
1.67k stars 244 forks source link

[SuperEditor] Japanese-kana input with live conversion disabled #1809

Open miguelcmedeiros opened 9 months ago

miguelcmedeiros commented 9 months ago

Package Version main branch with commit hash 2cb93e23ba2442e911c1bfcaf107c247adc6d131

To Reproduce Change keyboard to "Japanese - Kana" and disable "Live conversion": Screenshot 2024-01-16 at 10 12 27

  1. Go to SuperEditor demo
  2. Place the selection in the text
  3. Type "querty"
  4. Press down-arrow key to place the selection a conversion from the IME panel
  5. Press Return to select

Actual behavior  (invalid character) replaces the content when down-arrow key is pressed and the "old" content is added when Return is pressed.

Expected behavior Conversion takes place and the content is replaced.

Platform MacOS.

Flutter version Flutter master commit e278279a48f0479386c249cf18f26b29c6f9018f.

Screenshots

https://github.com/superlistapp/super_editor/assets/31278849/9a7db2d9-36ce-4058-804a-450bd77ba727

Additional context Could not reproduce this issue with SuperTextField.

miguelcmedeiros commented 9 months ago

Cc @matthew-carroll @angelosilvestre

angelosilvestre commented 9 months ago

@miguelcmedeiros What exactly are the expected characters? Other apps I tried doesn't seem to convert anything after selecting the suggestion.

Apple notes:

https://github.com/superlistapp/super_editor/assets/7597082/fb27cb39-de0f-48b0-92b1-28b239714578

Notion:

https://github.com/superlistapp/super_editor/assets/7597082/8532407e-fe54-4565-8773-e853737631aa

Also, Flutter Textfield seems to generate the same characters:

https://github.com/superlistapp/super_editor/assets/7597082/62992c64-dc35-4509-b379-1a291a557bca

If you can detail the expected characters I will file an issue on the Flutter repo.

miguelcmedeiros commented 8 months ago

@angelosilvestre I tried typing in other tools (Slack and Safari) and there it seems to work properly (i.e. type something, get a proposed conversion and press down-arrow key to pre-select it):

https://github.com/superlistapp/super_editor/assets/31278849/faa721c0-0ec8-45d1-b0bd-b06ee206f532

I typed the "qwe" characters in my English-US keyboard.

It's surprising that Apple Notes is also broken for this.

From what I can see, from the recordings we see a different behavior between Flutter text field and SuperTextField. Or is it the same and Flutter somehow reacts differently to the same response?

angelosilvestre commented 8 months ago

This looks like a Flutter issue. I filed https://github.com/flutter/flutter/issues/142493