From 08fc027712b3731a86ab43dfb0cf9616e38f78ff Mon Sep 17 00:00:00 2001 From: X Code Date: Wed, 23 Jun 2021 09:00:53 -0700 Subject: [PATCH] Replace deprecated textEditingValue method (#271) * Replace deprecated textEditingValue method * Change to SelectionChangedCause.drag --- lib/src/widgets/text_selection.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/widgets/text_selection.dart b/lib/src/widgets/text_selection.dart index a8748de1..85362c7a 100644 --- a/lib/src/widgets/text_selection.dart +++ b/lib/src/widgets/text_selection.dart @@ -157,8 +157,9 @@ class EditorTextSelectionOverlay { throw 'Invalid position'; } selectionDelegate - ..textEditingValue = - value.copyWith(selection: newSelection, composing: TextRange.empty) + ..userUpdateTextEditingValue( + value.copyWith(selection: newSelection, composing: TextRange.empty), + SelectionChangedCause.drag) ..bringIntoView(textPosition); }