From 23bc6d2f58ab7ab4ff21c507d53753de35094ec0 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Wed, 14 Jun 2023 19:23:07 +0800 Subject: [PATCH] feat: support current editting value (#196) * feat: clear selection when losing focus * feat: support currect editing value in delta_input_service --- .../editor_component/service/ime/delta_input_service.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/editor/editor_component/service/ime/delta_input_service.dart b/lib/src/editor/editor_component/service/ime/delta_input_service.dart index 046844866..f6a7505ac 100644 --- a/lib/src/editor/editor_component/service/ime/delta_input_service.dart +++ b/lib/src/editor/editor_component/service/ime/delta_input_service.dart @@ -59,7 +59,7 @@ class DeltaTextInputService extends TextInputService with DeltaTextInputClient { AutofillScope? get currentAutofillScope => throw UnimplementedError(); @override - TextEditingValue? get currentTextEditingValue => throw UnimplementedError(); + TextEditingValue? currentTextEditingValue; TextInputConnection? _textInputConnection; @@ -100,6 +100,7 @@ class DeltaTextInputService extends TextInputService with DeltaTextInputClient { _textInputConnection! ..setEditingState(formattedValue) ..show(); + currentTextEditingValue = formattedValue; Log.input.debug( 'attach text editing value: $textEditingValue',