Fix emoji insertion corruption by using grapheme-aware text operations by Istiak-Ahmed78 · Pull Request #183112 · flutter/flutter
- Update TextEditingValue.replaced() to use grapheme cluster boundaries instead of UTF-16 code unit positions to prevent splitting surrogate pairs - Add TextInput._validateAndCorrectTextEditingValue() to detect and fix broken surrogate pairs received from the Android IME - Intercept platform text updates in _handleTextInputInvocation() to apply corrections before updating the text input client Fixes flutter#181759
bot
added
a: text input
labels
Mar 2, 2026This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters