Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Fixed the issue where the handwriting input method was unusable… #822

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,10 @@ class NonDeltaTextInputService extends TextInputService with TextInputClient {
start: composingTextRange!.start,
end: delta.composing.end,
);
return;
} else {
composingTextRange = delta.composing;
return;
}
}

Expand All @@ -198,12 +200,11 @@ class NonDeltaTextInputService extends TextInputService with TextInputClient {
PlatformExtension.isMacOS) &&
delta is TextEditingDeltaNonTextUpdate) {
composingTextRange = delta.composing;
return;
}

// 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;
}
composingTextRange = TextRange.empty;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class KeyboardServiceWidgetState extends State<KeyboardServiceWidget>
/// handle hardware keyboard
KeyEventResult _onKeyEvent(FocusNode node, KeyEvent event) {
if ((event is! KeyDownEvent && event is! KeyRepeatEvent) ||
!enableShortcuts) {
(!enableShortcuts && !backspaceCommand.canRespondToRawKeyEvent(event))) {
if (textInputService.composingTextRange != TextRange.empty) {
return KeyEventResult.skipRemainingHandlers;
}
Expand Down
Loading