Skip to content

Comments

fix: re-focus message input after sending#110

Merged
philz merged 2 commits intoboldsoftware:mainfrom
alexmdac:main
Feb 23, 2026
Merged

fix: re-focus message input after sending#110
philz merged 2 commits intoboldsoftware:mainfrom
alexmdac:main

Conversation

@alexmdac
Copy link
Contributor

When submitting a message, setSubmitting(true) disables the
textarea, which causes the browser to drop focus. After submission
completes, a useEffect restores focus, but only if the user hasn't
deliberately moved focus elsewhere (checked via
document.activeElement === document.body).

Skipped on mobile to avoid popping up the soft keyboard unexpectedly.

@cla-bot
Copy link

cla-bot bot commented Feb 18, 2026

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw at david@bold.dev to get yourself added.

When submitting a message, setSubmitting(true) disables the textarea,
which causes the browser to drop focus. After submission completes,
a useEffect restores focus — but only if the user hasn't deliberately
moved focus elsewhere (checked via document.activeElement === document.body).

Skipped on mobile to avoid popping up the soft keyboard unexpectedly.

Co-authored-by: Shelley <shelley@exe.dev>
@cla-bot
Copy link

cla-bot bot commented Feb 18, 2026

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw at david@bold.dev to get yourself added.

@cla-bot cla-bot bot added the cla-signed label Feb 18, 2026
@philz philz merged commit a2783d1 into boldsoftware:main Feb 23, 2026
1 check passed
@philz
Copy link
Contributor

philz commented Feb 23, 2026

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants