fix: assertion failure for swipe typing and undo on Android

pull/1898/head
crasowas 11 months ago
parent 7ec7d4fe27
commit 95ba7a8922
No known key found for this signature in database
GPG Key ID: EF1C251CBDCC9F3D
  1. 4
      lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart

@ -141,8 +141,10 @@ mixin RawEditorStateTextInputClientMixin on EditorState
// with the last known remote value.
// It is important to prevent excessive remote updates as it can cause
// race conditions.
final composingRange = _lastKnownRemoteTextEditingValue!.composing;
final actualValue = value.copyWith(
composing: _lastKnownRemoteTextEditingValue!.composing,
// Ignore last known composing range if it exceeds current text length.
composing: composingRange.end > value.text.length ? null : composingRange,
);
if (actualValue == _lastKnownRemoteTextEditingValue) {

Loading…
Cancel
Save