You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enter key submits form during streaming because querySelector('button[type="submit"]') returns null #439
When PromptInputSubmit is in the generating/streaming state it renders with type="button" instead of type="submit" to act as a stop button. This means form.querySelector('button[type="submit"]') in PromptInputTextarea returns null.
The Enter key guard checks submitButton?.disabled, which evaluates to undefined when submitButton is null — so the guard never fires and form.requestSubmit() is called anyway, allowing users to submit a new message
while the model is still streaming.
Fix
// beforeif(submitButton?.disabled){// afterif(!submitButton||submitButton.disabled){NosubmitbuttonintheDOM→we're in stop/generating mode → block submission.
Steps to reproduce
Send a message and wait for the model to start streaming
Quick behavior check for this one: during streaming, if a composable PromptInput doesn’t include PromptInputSubmit, should Enter still submit the form, or should the keypress be ignored? PromptInputTextarea currently uses that button to decide whether Enter is blocked, and the existing prompt-input.test.tsx coverage is a clean place to pin down the expected behavior.
Activity
Jaksenc commentedon Jul 14, 2026
Quick behavior check for this one: during streaming, if a composable
PromptInputdoesn’t includePromptInputSubmit, should Enter still submit the form, or should the keypress be ignored?PromptInputTextareacurrently uses that button to decide whether Enter is blocked, and the existingprompt-input.test.tsxcoverage is a clean place to pin down the expected behavior.