Closed raoulsullivan closed 6 years ago
I don't have to problem on my version, here is my testing code
$('#broken').tokenize2({
tokensMaxItems: 1
});
$('#btn_validation').on('click', function(e){
e.preventDefault();
console.log($('#broken').get(0).checkValidity());
});
Thanks for taking the time to look into this - could I confirm you were testing this with Safari? I didn't have similar problems with any builds of Chrome or Firefox that I tried.
I'll ask my mac-wielding colleagues to take a deeper look and I'll report back here either way.
@zellerda Same issue for me with the latest Safari version 12.0 @raoulsullivan FYI
Thanks, Max. @zellerda this is now on our project bug tracker and we'll do a PR back here if we fix it. Or at least let you know if we find out it's something else ;)
If a select element has the
required
attribute then changing the token in tokenize2 results in the select element being invalid (.checkValidity()
returnsfalse
), even though an option has theselected
attribute set correctly and.value
returns the correct value. Selecting the value directly in the select element works fine.I'm guessing this could well be a Safari issue instead! Safari versions 10.1.2 and 11.1.2.
HTML
Investigating in console after setting token "1"