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

CreateChat dialog: Trim the input value to fix #3299 #3300

Merged
merged 9 commits into from
Jul 17, 2023

Conversation

farooqkz
Copy link
Collaborator

This is a trivial solution to fix #3299. I simply trim the value of the <input> upon each change.

@farooqkz farooqkz requested a review from Simon-Laux July 11, 2023 10:24
CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Simon Laux <Simon-Laux@users.noreply.github.com>
Copy link
Member

@Simon-Laux Simon-Laux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok just tested it, looks we also need to trim it before giving it to the email validation function

@farooqkz
Copy link
Collaborator Author

I just remembered for the same reason I trimmed it in there lol

@farooqkz
Copy link
Collaborator Author

@Simon-Laux What's the problem with trimming them the first place I did?

@Simon-Laux
Copy link
Member

@Simon-Laux What's the problem with trimming them the first place I did?

user can not type spaces which feels restricted, say for example you have multiple contacts with the same first name but different surnames and you want to just type it in, then notice that you can not type a space.

@farooqkz
Copy link
Collaborator Author

I've updated the hook used for searching for contacts to trim the provided queryStr before using it as a search query for contact list or checking validity of it as an email address.

Also, when the user queries a name, all the contacts with that name and the "New contact" item are shown but clicking on the "New contact" button does nothing. It's a bug I suppose?

@farooqkz farooqkz requested a review from Simon-Laux July 17, 2023 09:11
@Simon-Laux Simon-Laux merged commit 17a592f into deltachat:master Jul 17, 2023
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.

Sanitize Input in New Chat Dialog
2 participants