super_editor icon indicating copy to clipboard operation
super_editor copied to clipboard

[Web] Typing "Umlaute" on English keyboard broken in Safari

Open brian-superlist opened this issue 2 years ago • 5 comments

Reproduction Steps

  1. Run or Build the super editor example app (main super_editor, master flutter)
  2. Run app with local web server if building the app
  3. Browse to app with Safari. I'm using Safari Version 16.6 (18615.3.12.11.2).
  4. Type Option + U
  5. Type letter a

Expected: ä Actual: ¨ä`

Notes

  • Chrome composes ä correctly
  • Desktop composes ä correctly as well
  • Something about Safari in particular
  • Flutter Textfield in Safari works

Logs

No errors were produced.

Videos

https://github.com/superlistapp/super_editor/assets/90610075/b73b00d4-9628-4054-b1a5-180edbda703a

https://github.com/superlistapp/super_editor/assets/90610075/34610d9b-ad63-43a0-896b-7849f2270734

brian-superlist avatar Sep 04 '23 10:09 brian-superlist

@brian-superlist can you confirm that your SuperEditor was in IME mode?

matthew-carroll avatar Sep 05 '23 05:09 matthew-carroll

Yes, I can confirm the editor was in IME mode.

Screenshot of Safari with IME log enabled:

Screenshot 2023-09-05 at 10 04 36 AM

brian-superlist avatar Sep 05 '23 08:09 brian-superlist

@matthew-carroll This seems to be a Flutter bug on safari with all compound characters.

When starting the input of a compound character, both selection and composingRegion are reported as expanded. The selection should be collapsed. This seems to be an issue only when using the delta model.

After we apply the deltas, we end up with a different selection from what the IME thinks it is, so we call setEditingState to sync. This seems to be breaking the input. On chrome, the selection is reported as collapsed, so we don't call setEditingState. Maybe we could try to work around this issue, but this should be fixed in Flutter web.

Flutter's TextField doesn't have this issue because it doesn't use the delta model. I'll try to write a minimal repro and file a ticket in Flutter repo.

https://github.com/superlistapp/super_editor/assets/7597082/a1cc5d8f-32fb-46ac-915d-7b081ef1fdc7

angelosilvestre avatar Sep 06 '23 00:09 angelosilvestre

@angelosilvestre can you check for an existing Flutter issue? If one doesn't exist, can you file one with a repro?

matthew-carroll avatar Sep 06 '23 00:09 matthew-carroll

Filed https://github.com/flutter/flutter/issues/134092

angelosilvestre avatar Sep 06 '23 02:09 angelosilvestre