Skip to content

Focus is dropped after cancelling a streaming response #242

Description

@cpsievert

When the user clicks the Stop generating (cancel) button, focus stays on that button. The button then transitions to a spinner and back into the send button — and if there's no text in the input, the send button is disabled, so focus falls back to <body>.

After cancelling a stream the user typically wants to type a follow-up, so focus should move into the textarea instead.

Suggested fix: focus the textarea when cancelStream runs (js/src/chat/ChatContainer.tsx, around line 134).

Noticed while working on a file-upload branch, but this is pre-existing behavior unrelated to uploads, so filing separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowLow-impact bug, docs polish, papercut, or unclear low-severity request.ai-triage:doneMarks an issue whose AI triage workflow is complete.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions