mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-19 10:39:26 +01:00
Fix loose focus in web
This commit is contained in:
parent
b1996bc10e
commit
328300e598
@ -36,6 +36,8 @@ class _ChatState extends State<Chat> {
|
||||
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
|
||||
FocusNode inputFocus = FocusNode();
|
||||
|
||||
Timer typingCoolDown;
|
||||
Timer typingTimeout;
|
||||
bool currentlyTyping = false;
|
||||
@ -369,7 +371,11 @@ class _ChatState extends State<Chat> {
|
||||
keyboardType: kIsWeb
|
||||
? TextInputType.text
|
||||
: TextInputType.multiline,
|
||||
onSubmitted: (t) => send(),
|
||||
onSubmitted: (String text) {
|
||||
send();
|
||||
FocusScope.of(context).requestFocus(inputFocus);
|
||||
},
|
||||
focusNode: inputFocus,
|
||||
controller: sendController,
|
||||
decoration: InputDecoration(
|
||||
hintText: I18n.of(context).writeAMessage,
|
||||
|
Loading…
Reference in New Issue
Block a user