mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fix a crash when deleting text in an EditableText inside CupertinoPageRoute, with a CJK keyboard on Android. CJK Keyboards on Android may send a key event instead of directly updating the text through the IME, in that case we do not hide the toolbar when text is deleted. This causes an exception when in scrollable text, because the context menu scroll listener tries to access the `RenderBox.size` while in a weird state. This change fixes that and hides the toolbar when text is deleted through a key event. Fixes #153949 Cherry-pick of: #153822 Related issue: #153003