I dont know if this is for a particular reason, but i cant seem to get a dropdown box to validate on blur or change events. It does validate correctly upon form submit.
All semantic-ui demo code for form validation also has this, so no demo code needed i suppose.
Any update on the issue ?
Here is a jsfiddle that duplicates the error : http://jsfiddle.net/8wm6uoth/18/
All elements validate trough blur, only dropdown doesn't, still validates on submit tho.
I'll try to sneak this in 1.9
awesome, thanks :+1:
everything seems fine now, thanks for the fix :+1:
I am still having this issue with Semantic-ui 2.1.5. only dropdown doesn't validate onBlur.
I am using semantic ui with React framework.
Demo site seems to have same issue too.
http://semantic-ui.com/behaviors/form.html#/examples
Echoing @utsavig, dropdown doesn't validate on blur.
I'm using semantic-ui-dropdown npm package. To fix @utsavig problem, I added :
$input.trigger('blur');
to the blur method on line 927
blur: function(event) {
$input.trigger('blur');
pageLostFocus = (document.activeElement === this);
if(!activated && !pageLostFocus) {
module.remove.activeLabel();
module.hide();
}
}
Still seeing the 'blur' problem in 2.3.1 and on the examples page.
Im using this for now:
$('.ui.dropdown').on('blur', function () {
setTimeout(function ($e) { $e.find('input,select').trigger('blur') }, 1, $(this))
})
The setTimeout is there to avoid a flash of the error prompt when selecting a value. Hope someone else finds it useful.
Most helpful comment
Still seeing the 'blur' problem in
2.3.1and on the examples page.Im using this for now:
The
setTimeoutis there to avoid a flash of the error prompt when selecting a value. Hope someone else finds it useful.