Skip to content

Commit

Permalink
Japanese input bug (#517)
Browse files Browse the repository at this point in the history
* Fix #514 : remain converted character

* Fix #476
  • Loading branch information
okano4413 authored Nov 1, 2023
1 parent ee70446 commit 132f317
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/src/widgets/input/input.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_chat_types/flutter_chat_types.dart' as types;
Expand Down Expand Up @@ -54,6 +55,9 @@ class _InputState extends State<Input> {
PhysicalKeyboardKey.shiftRight,
}.contains(el),
)) {
if (kIsWeb && _textController.value.isComposingRangeValid) {
return KeyEventResult.ignored;
}
if (event is KeyDownEvent) {
_handleSendPressed();
}
Expand Down Expand Up @@ -103,6 +107,9 @@ class _InputState extends State<Input> {
}

void _handleTextControllerChange() {
if (_textController.value.isComposingRangeValid) {
return;
}
setState(() {
_sendButtonVisible = _textController.text.trim() != '';
});
Expand Down

0 comments on commit 132f317

Please sign in to comment.