From 1d4bc26718476148d47741da2cb7b1395788fff1 Mon Sep 17 00:00:00 2001 From: q200892907 <200892907@qq.com> Date: Sat, 13 Jan 2024 23:22:53 +0800 Subject: [PATCH] fix: solve the problem that Chinese ime cannot continue deleting after deleting input content (#672) --- .../service/ime/non_delta_input_service.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart b/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart index 82feb067c..c763b73db 100644 --- a/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart +++ b/lib/src/editor/editor_component/service/ime/non_delta_input_service.dart @@ -192,6 +192,11 @@ class NonDeltaTextInputService extends TextInputService with TextInputClient { delta is TextEditingDeltaNonTextUpdate) { composingTextRange = delta.composing; } + + // solve the issue where the Chinese IME doesn't continue deleting after the input content has been deleted. + if (composingTextRange?.isCollapsed ?? false) { + composingTextRange = TextRange.empty; + } } }