Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance user input validation to prevent empty submissions and disable send button. #37

Open
ADISHA2003 opened this issue Dec 24, 2024 · 0 comments

Comments

@ADISHA2003
Copy link

Description of the bug:

Currently, when users press the Enter key in the input field without typing any text (or if the input contains only whitespace), the input is submitted unintentionally, resulting in an empty submission. This leads to unnecessary actions and negatively impacts the user experience by allowing empty messages to be sent.

Actual vs expected behavior:

Actual Behavior:
Pressing Enter with empty or whitespace-only input still submits an empty message.
There is no prevention for sending an empty message, leading to a poor user experience.

Impact:
This bug results in empty submissions, cluttering logs and affecting the overall user experience by allowing invalid input to be submitted unintentionally.

Expected Behavior:
The Enter key should trigger a submission only if the input contains valid text (non-whitespace characters).
The Send button should be disabled when the input is empty or contains only whitespace, providing a clear visual indicator to the user.

Any other information you'd like to share?

I have already created a pull request addressing this issue. The pull request includes changes to prevent empty submissions by validating the input and disabling the Send button when the input is empty or contains only whitespace.

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

No branches or pull requests

1 participant