super_editor
super_editor copied to clipboard
[Web] Typing "Umlaute" on English keyboard broken in Safari
Reproduction Steps
- Run or Build the super editor example app (main super_editor, master flutter)
- Run app with local web server if building the app
- Browse to app with Safari. I'm using Safari Version 16.6 (18615.3.12.11.2).
- Type
Option + U - 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 can you confirm that your SuperEditor was in IME mode?
Yes, I can confirm the editor was in IME mode.
Screenshot of Safari with IME log enabled:
@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 can you check for an existing Flutter issue? If one doesn't exist, can you file one with a repro?
Filed https://github.com/flutter/flutter/issues/134092