Skip to content

Commit

Permalink
TW-1031: tap outside of screen also close the keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored and hoangdat committed Feb 19, 2024
1 parent 8473d32 commit 97e9ac5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/pages/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,13 @@ class ChatController extends State<Chat>
}
}

void onHideKeyboardAndEmoji() {
hideKeyboardChatScreen();
if (!PlatformInfos.isWeb) {
showEmojiPickerNotifier.value = false;
}
}

void onKeyboardAction() {
showEmojiPickerNotifier.toggle();
inputFocus.requestFocus();
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/chat/chat_event_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ChatEventList extends StatelessWidget {
controller.listHorizontalActionMenuBuilder(),
onMenuAction: controller.handleHorizontalActionMenu,
hideKeyboardChatScreen:
controller.hideKeyboardChatScreen,
controller.onHideKeyboardAndEmoji,
markedUnreadLocation:
controller.unreadReceivedMessageLocation,
hideTimeStamp: isInView,
Expand Down

0 comments on commit 97e9ac5

Please sign in to comment.