fix RichTextField selection (#2374)

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-10 11:11:50 +08:00
parent ce09306025
commit 434f2742a6
2 changed files with 5 additions and 21 deletions

View File

@@ -2627,7 +2627,7 @@ class EditableTextState extends State<EditableText>
composing: TextRange.empty,
),
);
final newValue = _value.copyWith(
final newValue = TextEditingValue(
text: widget.controller.plainText,
selection: widget.controller.newSelection,
composing: TextRange.empty,
@@ -3569,7 +3569,7 @@ class EditableTextState extends State<EditableText>
remoteValue = delta.apply(remoteValue);
}
final newValue = _value.copyWith(
final newValue = TextEditingValue(
text: widget.controller.plainText,
selection: widget.controller.newSelection,
composing: textEditingDeltas.last.composing,
@@ -5552,7 +5552,7 @@ class EditableTextState extends State<EditableText>
),
);
final newValue = oldValue.copyWith(
final newValue = TextEditingValue(
text: widget.controller.plainText,
selection: widget.controller.newSelection,
composing: TextRange.empty,