Why can't I send when the chat input box is empty #12389

Closed
opened 2026-02-21 19:07:11 -05:00 by yindo · 3 comments
Owner

Originally created by @Tu1231 on GitHub (Mar 31, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when I last added the picture to the chat, pressing enter directly shows that the input cannot be empty,
When I uploaded the image to the chat last time, pressing enter directly showed that the input cannot be empty. When I tested the input box with the following workflow and replied directly with "test empty", the test also showed that the question cannot be empty

Image

✔️ Expected Behavior

When the input box is empty and the uploaded file or image is not empty, the question can be asked normally

Actual Behavior

As long as the input box is empty, whether uploading images or documents, the question cannot be left blank

Originally created by @Tu1231 on GitHub (Mar 31, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce when I last added the picture to the chat, pressing enter directly shows that the input cannot be empty, When I uploaded the image to the chat last time, pressing enter directly showed that the input cannot be empty. When I tested the input box with the following workflow and replied directly with "test empty", the test also showed that the question cannot be empty ![Image](https://github.com/user-attachments/assets/8b1b421d-b390-4a89-9d70-80e6c0395dec) ### ✔️ Expected Behavior When the input box is empty and the uploaded file or image is not empty, the question can be asked normally ### ❌ Actual Behavior As long as the input box is empty, whether uploading images or documents, the question cannot be left blank
yindo added the 🌚 invalid label 2026-02-21 19:07:11 -05:00
yindo closed this issue 2026-02-21 19:07:11 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 31, 2025):

The reason you can't send a message when the chat input box is empty, even if you have uploaded an image or document, is due to the logic in the ChatInputArea component. The handleSend function checks if the text input is empty or only contains whitespace, and it also verifies if any files are still uploading. If either condition is true, it prevents the message from being sent and notifies you to either wait for the file upload to complete or to enter a message in the input box [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Mar 31, 2025): <!-- Answer --> The reason you can't send a message when the chat input box is empty, even if you have uploaded an image or document, is due to the logic in the `ChatInputArea` component. The `handleSend` function checks if the text input is empty or only contains whitespace, and it also verifies if any files are still uploading. If either condition is true, it prevents the message from being sent and notifies you to either wait for the file upload to complete or to enter a message in the input box <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/base/chat/chat/chat-input-area/index.tsx)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/0b6c2c9f-9cd3-4579-b9aa-337875763c9b?feedback_type=other)</sup>
Author
Owner

@Tu1231 commented on GitHub (Mar 31, 2025):

How can I solve this problem

@Tu1231 commented on GitHub (Mar 31, 2025): How can I solve this problem
Author
Owner

@crazywoola commented on GitHub (Mar 31, 2025):

This is only for bug report, if you would like to ask a question, please head to Discussions.

@crazywoola commented on GitHub (Mar 31, 2025): This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12389