Inconsistent caret position when typing emojis into TextField #31818
Labels
a: text input
Entering text in a text field or keyboard related problems
framework
flutter/packages/flutter repository. See also f: labels.
Open any
TextField
and type "abc", then type the rainbow flag emoji. The caret will be displayed before the emoji. The fieldsbaseOffset
andextentOffset
ofTextSelection
hold the correct value, so if you type another letter, it will be correctly displayed at the end of theTextField
.This depends on the emoji. If instead of the rainbow flag you were to type the pirate flag, the caret would be displayed at the beginning, before the letter "a".
It seems to me that emojis that are comprised of multiple code points make Flutter confused.
Perhaps these issues are related, but I'm not sure:
dart-lang/language#34
dart-lang/language#49
The text was updated successfully, but these errors were encountered: