1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 13:58:47 +00:00

Reenable simplistic_editor on CI (#2238)

This commit is contained in:
Parker Lougheed
2024-04-09 03:56:03 -05:00
committed by GitHub
parent ba03527598
commit 5149510f44
3 changed files with 4 additions and 5 deletions

View File

@@ -780,7 +780,8 @@ class BasicTextInputClientState extends State<BasicTextInputClient>
// We return early if the selection is not valid. This can happen when the
// text of the editable is updated at the same time as the selection is
// changed by a gesture event.
if (!widget.controller.isSelectionWithinTextBounds(selection)) return;
final textLength = _value.text.length;
if (selection.start > textLength || selection.end > textLength) return;
widget.controller.selection = selection;