Open dmedyk opened 7 years ago
I confirm this issue.
Sorry for tagging you @ragulka, but doesn't it happen to you as well?
This issue still not solve yet? Is there any proper fix? Fix provided above works but it produce bug with tab key not accepting input.
Yep, this fix break a keyboard tag input
this.$input.val().length || this.$input.data('edit')
input work fine, but select from list and press enter - call a double token creation.
this.$input.val().length && this.$input.data('edit')
select from list work fine, but handy input is break.
$('#tokenfield').on('tokenfield:createtoken', function (event) {
var existingTokens = $(this).tokenfield('getTokens');
$.each(existingTokens, function(index, token) {
if (token.value === event.attrs.value)
event.preventDefault();
});
});
Work fine
@SemirLab2 that doesn't work if they already have the tag and want to add it again for some reason.
Hello, when i selected item via autocmplete menu with 'enter' key press, i have 2 tokens created. i fixed this with:
line 490 in keydown function
to
but i don't know if i break the edit feature. Can you tell me if it's correct ?
Thank you