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, 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,
), ),