Skip to content

Commit

Permalink
fix: reset composing range if it's collapsed on macOS (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
q200892907 authored Sep 3, 2024
1 parent a64a516 commit 0b6b173
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:math';

import 'package:appflowy_editor/appflowy_editor.dart';
Expand Down Expand Up @@ -192,6 +193,11 @@ class NonDeltaTextInputService extends TextInputService with TextInputClient {
)
: delta.composing;
}

// solve the issue where the Chinese IME doesn't continue deleting after the input content has been deleted.
if (Platform.isMacOS && (composingTextRange?.isCollapsed ?? false)) {
composingTextRange = TextRange.empty;
}
}
}

Expand Down

0 comments on commit 0b6b173

Please sign in to comment.