Don't defocus chat box on send

This commit is contained in:
Henry Hiles 2026-04-04 18:49:21 -04:00
commit 9464b2bf78
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -149,6 +149,7 @@ class ChatBox extends HookConsumerWidget {
enabled: canSendMessages,
maxLines: 12,
minLines: 1,
autofocus: true,
decoration: InputDecoration(
hintText: canSendMessages
? "Your message here..."
@ -159,6 +160,8 @@ class ChatBox extends HookConsumerWidget {
key: key,
// TODO: Setting for send on enter on / off
onFieldSubmitted: (_) => send(),
// Don't defocus on submit
onEditingComplete: () {},
textInputAction: TextInputAction.done,
focusNode: node,
),