From 45ff63355ccbb614fb845db2ebb0c38affcbec33 Mon Sep 17 00:00:00 2001 From: Luy2077 <36870873+Lamda303@users.noreply.github.com> Date: Wed, 17 Jan 2024 00:04:57 +0800 Subject: [PATCH] fix selection.affinity always downstream after updateEditingValue (#1682) Co-authored-by: luying --- .../raw_editor/raw_editor_state_text_input_client_mixin.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart b/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart index ceb91645..ce9107fa 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart @@ -203,7 +203,8 @@ mixin RawEditorStateTextInputClientMixin on EditorState diff.start, diff.deleted.length, diff.inserted, - value.selection, + value.selection.copyWith( + affinity: widget.configurations.controller.selection.affinity), ); // if (widget.configurations.controller.selectedFontFamily != null) {