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

Can not add a tag to tags list #408

Closed
andrei-galkin opened this issue Jul 10, 2018 · 1 comment
Closed

Can not add a tag to tags list #408

andrei-galkin opened this issue Jul 10, 2018 · 1 comment

Comments

@andrei-galkin
Copy link

andrei-galkin commented Jul 10, 2018

I have faced a weird case when I can not add a tag to the list because it fails at this part of code.

if (this._trigger('beforeTagAdded', null, {
                tag: tag,
                tagLabel: this.tagLabel(tag),
                duringInitialization: duringInitialization
            }) === false) {
                return;
            }

 if (this.options.singleField) {
                var tags = this.assignedTags();
                tags.push(value);
                this._updateSingleTagsField(tags);
            }

When I try to select the tag "Tech Value Distribution" it can not go trough the first condition and the tag is not added but other tags are fine and they come to the second condition and are added to the list. I am stuck and can not debug further through minified jquiry and do not have ideas how to find the reason why the statement

this._trigger('beforeTagAdded', null, {
                tag: tag,
                tagLabel: this.tagLabel(tag),
                duringInitialization: duringInitialization
            })  

executes and return false but for other tags it is always true.
Can some one share idea why the tag can not be added?

Thank you

PS
The version of the script is @Version v2.0 (06/2011)

@andrei-galkin
Copy link
Author

Found the issue. Need to be attentive with data.

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

No branches or pull requests

1 participant