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

fix: Continuously pressing enter shows empty tags #6314

Merged
merged 2 commits into from
Oct 16, 2022

Conversation

particleflux
Copy link

When on a contact page, and adding tags, after adding the first tag, continuously pressing enter adds "empty" tags to the UI.

Seems to be introduced by a fix of QA tool issues in 57b31f6

Before this change this.search != '' evaluated to true if search was null, with a strict comparison that is no longer the case. The this.search is reset to null though in some cases.

I thought about simply extending the condition to also check for !== null, though imho the better solution would be to always reset it to empty string state, as is the default value. That also matches some click handler value, and is generally both the value on "non-changed" and on "changed but empty".

fixes #6235

When on a contact page, and adding tags, after adding the first tag,
continuously pressing enter adds "empty" tags to the UI.

Seems to be introduced by a fix of QA tool issues in
57b31f6

Before this change `this.search != ''` evaluated to true if search was `null`,
with a strict comparison that is no longer the case.
The `this.search` is reset to `null` though in some cases.

I thought about simply extending the condition to also check for `!== null`,
though imho the better solution would be to always reset it to empty string
state, as is the default value. That also matches some click handler value,
and is generally both the value on "non-changed" and on "changed but empty".

fixes monicahq#6235
@asbiin asbiin merged commit 2386096 into monicahq:main Oct 16, 2022
@asbiin
Copy link
Member

asbiin commented Oct 16, 2022

Thank you @particleflux

@particleflux particleflux deleted the issue-6235 branch October 16, 2022 10:27
@github-actions
Copy link

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Feb 3, 2024

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disallow to create empty tags
2 participants