mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Samsung's Korean keyboard has a bug where it always attempts to combine characters based on its internal state, ignoring if and when the cursor is moved programmatically. EG typing "ㄴㅇ" and then moving the cursor back to the front of the text and typing "ㄴ" again would result in "ㄴㅇㄴ", not "ㄴㄴㅇ". Fully restarting the IMM works around this because it flushes the keyboard's internal state and stops it from trying to incorrectly combine characters. However this also has some negative performance implications, so we only apply the workaround on Samsung devices set to use Korean input. This also effectively disables the feature on Samsung keyboards that allowed users to re-open a composing region for previously typed characters. See https://github.com/flutter/flutter/issues/29341#issuecomment-531283508. Fixes flutter/flutter#29341.