-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Composing region on web for firefox using delta model. This issue is very specific and a little hard to pin down.
If the amount of text inputted during composing is more than one character, and it composes down to one character, the text inputting does not replace until the next keypress. Here is a list of "triagable" cases:
- Type 'ni' into the composing keyboard, then select the composition. This will not replace properly, as it is more than one character (ni.length == 2) and composes down into a single symbol.
- Type 'n' into the composing keyboard, then select the composition. This will replace properly, as it is one character composing down into one character.
- Type 'ni ho' into the composing keyboard, then select the composition. This will replace properly, as it is more than one character composing down into more than one character.
Steps to Reproduce
- Execute
flutter runon the delta model sample found here - Activate the Chinese composing keyboard "Pinyin - simplified" on Mac
- Run the above examples
Expected results:
Compose the characters "ni -> 霓" see that text replacement works properly, and the entirely of "ni" is replaced with the composed symbol.
Actual results:
'ni' is not replaced with '霓' until a new event is fired after the composition - see that 'ni' stays in the text field along with it's composing output, 霓: something like 'ni霓'. Then when you type a new character such as n, you get '霓n'.
no MVP for this, since setting a delta keyboard up is pretty involved. It is better to just use the Delta Model example linked above and here.
Examples:
working case:
https://user-images.githubusercontent.com/48811365/171703331-59953541-5c50-4352-9394-aea94a582370.mov
See that 'n' composes to one character and fully replaces. The same is true for 'ni ho', which composes down into two characters (maybe it is another bug that 'ho' is not being displayed onto the text field) and also replaces fine.
not working case:
https://user-images.githubusercontent.com/48811365/171703788-ebb65486-61d5-4e04-b187-cfb29bed41cb.mov
See that 'ni' is not replaced by it's composed text '你‘ until a new character is placed. The same is true for longer composing text like 'song' which composes down into one symbol.