tagify icon indicating copy to clipboard operation
tagify copied to clipboard

Some tags are not recognized as duplicates, and duplicates not auto deleting.

Open diegolaz79 opened this issue 3 years ago • 2 comments

Prerequisites

  • [x] 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

Could not recreate project as with basic settings seemed to work well on js bin.

Strange behavioir some tags still keep getting suggested and some not.

This is what I have on the success event of the ajax that reads the list of words in a text file which contains (and retrieves ok) tag1,tag2,aaabb,bbbbc,cccbd,eeec,fffcc,tag con espacio

Code:

whitelist = data.split(",");
var tagify = new Tagify(sectionElm, {
    duplicates: false,
    keepInvalidTags: true,
    dropdown: {
        enabled: 1,
        position: "text"
    },
    // after 2 characters typed, all matching values from this list will be suggested in a dropdown
    whitelist: [].concat(whitelist),
    hooks: {
        beforePaste: function (content) {
            return new Promise((resolve, reject) => {
                confirm("Allow pasting?")
                    ? resolve()
                    : reject()
            })
        }
    }
})

No error message. tagifybug

Any troubleshooting help? Thanks!

diegolaz79 avatar Jan 28 '22 13:01 diegolaz79

some notes... after using tag1, it no longer suggests it and if I enter it anyway it stays in red but doesnt get deleted. But strangly tag2 I can enter as many times as I want and it gets suggested every time I type "t"

diegolaz79 avatar Jan 28 '22 13:01 diegolaz79

Hi, duplicates are not deleted because you've set duplicates: false and especially keepInvalidTags: true

Please help me help you by providing me with a jsbin example page with minimal setup which showcases the issue

yairEO avatar Feb 05 '22 21:02 yairEO