mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Fixes #153003 Pressing backspace on CJK keyboards to delete text may trigger a key event which in turns triggers the `DeleteTextIntent`. This is different than English keyboards where the updated `TextEditingValue` from the `TextInputPlugin` will come through `updateEditingValue` which allows us to hit the codepath that hides the text selection toolbar.23883b13d4/packages/flutter/lib/src/widgets/editable_text.dart (L3245-L3250)Because CJK keyboards may not hit this codepath, when the text is long and editable text tries to bring the new selection into view by scrolling, this triggers the hide context menu scroll listener in a weird state23883b13d4/packages/flutter/lib/src/widgets/editable_text.dart (L3865-L3869)causing an exception to be thrown. This PR tries to work around the issue above by hiding the toolbar when a `DeleteTextIntent` is received.