-
Notifications
You must be signed in to change notification settings - Fork 442
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
Tag are removed on dropdown close #1430
Comments
One solution I have found so far is:
Render content of custom HTML elements as an attribute and use CSS to render like as:
Interestingly, the IMG tag seems to work fine, but other elements, such as DIV or SPAN, are not working. Maybe it is a sanitization problem or a bug. |
Can you please create a minimal demo of the bug by cloning this jsbin? |
Your The internal |
Prerequisites
Hello, when I open the dropdown on single value mode and do not select any value dropdown it closes, but my value is removed too.
After some testing, I see the problem comes from the templates tag, now my template is:
If I use the demo code from "Example of overriding the tag template", all seem to work correctly, and the tag is not removed when the dropdown is open/closed with no value selected.
My template:
Example of overriding the tag template (all seem to work correctly):
This line seems to cause the problem, but I don't know why, as all are generated correct:
Also, here is the full code that generates Tagify instances.
Update:
After some more tests, I see if I put any HTML tag with content, like
<span>text</span>
, it will delete the currently selected tag on the dropdown open/close.Ex:
The text was updated successfully, but these errors were encountered: