Skip to content

fix: prevent Enter key from submitting during file upload#1005

Closed
the-quantum-nargle wants to merge 1 commit intovercel:mainfrom
the-quantum-nargle:fix/disable-enter-during-upload
Closed

fix: prevent Enter key from submitting during file upload#1005
the-quantum-nargle wants to merge 1 commit intovercel:mainfrom
the-quantum-nargle:fix/disable-enter-during-upload

Conversation

@the-quantum-nargle
Copy link
Copy Markdown

This PR fixes an issue where pressing Enter would unintentionally submit a message even if a file was still uploading.

Now, the Enter key is disabled while files are uploading in the multimodal input component, matching the behavior of the disabled Send button

Changes:

  • Added a check in the onKeyDown handler to prevent submission if uploadQueue.length > 0.
  • Shows a toast error if attempted.
  • This improves UX and prevents incomplete messages from being sent while uploads are in progress.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented May 13, 2025

@the-quantum-nargle is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@the-quantum-nargle
Copy link
Copy Markdown
Author

Hi @jeremyphilemon
Would you be able to take a look at this PR when you get a chance? Let me know if anything needs adjusting. Thanks!

@the-quantum-nargle the-quantum-nargle closed this by deleting the head repository May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant