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

Disallow to create empty tags #6235

Closed
edi9999 opened this issue Jul 20, 2022 · 5 comments · Fixed by #6314
Closed

Disallow to create empty tags #6235

edi9999 opened this issue Jul 20, 2022 · 5 comments · Fixed by #6314
Labels

Comments

@edi9999
Copy link

edi9999 commented Jul 20, 2022

By going to the following page (the page of one person)

http://localhost:9090/people/h:9qyA7LJYWZ18mVavMj

When adding a tag (for example "a"), if you type enter multiple times, it creates as many empty tags as the number of keypresses.

Here is a screenshot of what it results in :

Selection_002

This bugs seems to happen only after entering one tag that is not an empty string.

@edi9999
Copy link
Author

edi9999 commented Jul 20, 2022

Also, after reloading the page, those empty tags disappear, so it seems that this bug is only in the UI

particleflux added a commit to particleflux/monica that referenced this issue Sep 6, 2022
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
@particleflux
Copy link

Can reproduce locally, seems to be a regression bug. Fixed in #6314

asbiin pushed a commit that referenced this issue Oct 16, 2022
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
@edi9999
Copy link
Author

edi9999 commented Oct 17, 2022

Thanks !

@github-actions
Copy link

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

This issue 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 Jan 31, 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 a pull request may close this issue.

2 participants