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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to edit tags when they reached to maxTags #972

Closed
3 tasks done
maheee opened this issue Jan 28, 2022 · 3 comments
Closed
3 tasks done

Unable to edit tags when they reached to maxTags #972

maheee opened this issue Jan 28, 2022 · 3 comments
Labels

Comments

@maheee
Copy link
Contributor

maheee commented Jan 28, 2022

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

馃挜 Demo Page

https://jsbin.com/dayuserawo/edit?html,js,output

Source

    <script>
    var input = document.querySelector('input[name=basic]');
    new Tagify(input, {
	    "editTags": { "clicks": 2 },
		"whitelist": [ "Alpha", "Beta", "Gamma", "Delta" ],
		"dropdown": { "enabled": 0, "maxItems": 12 },
		"maxTags": 1
	})
    </script>

Explanation

  • What is the expected behavior?
    Double clicking starts renaming and pressing "Enter" should finish it.

  • What is happening instead?
    When "maxTags" is set to 1, I can't exit the renaming and the whole component is left in a weird state.
    tagify

  • What error message are you getting?
    none

@yairEO
Copy link
Owner

yairEO commented Jan 28, 2022

Why setting maxTags to 1 and not using mode : "select"?

https://yaireo.github.io/tagify/#section-mode-select

@maheee
Copy link
Contributor Author

maheee commented Jan 28, 2022

Hi, thanks, this might work in this specific case.

But it looks like the bug exists whenever "maxTags" is set, not only with 1.

image

@yairEO yairEO changed the title Renaming a tag doesn't work when "maxTags" is set to 1 Unable to edit tags when they reached to maxTags Jan 29, 2022
@yairEO
Copy link
Owner

yairEO commented Jan 29, 2022

I've renamed the title of this bug and will fix it, thanks for reporting!

@yairEO yairEO added the Bug label Jan 29, 2022
@yairEO yairEO closed this as completed in cd9e13a Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants