Don't defocus chat box on send
This commit is contained in:
parent
fd4b16c700
commit
9464b2bf78
1 changed files with 3 additions and 0 deletions
|
|
@ -149,6 +149,7 @@ class ChatBox extends HookConsumerWidget {
|
||||||
enabled: canSendMessages,
|
enabled: canSendMessages,
|
||||||
maxLines: 12,
|
maxLines: 12,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
|
autofocus: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: canSendMessages
|
hintText: canSendMessages
|
||||||
? "Your message here..."
|
? "Your message here..."
|
||||||
|
|
@ -159,6 +160,8 @@ class ChatBox extends HookConsumerWidget {
|
||||||
key: key,
|
key: key,
|
||||||
// TODO: Setting for send on enter on / off
|
// TODO: Setting for send on enter on / off
|
||||||
onFieldSubmitted: (_) => send(),
|
onFieldSubmitted: (_) => send(),
|
||||||
|
// Don't defocus on submit
|
||||||
|
onEditingComplete: () {},
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
focusNode: node,
|
focusNode: node,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue