I can blur my input by clicking anywhere on the page except the jQuery Sortable list. How can I fix this? UPD: demo
$('sortable').mousedown(function(){
document.activeElement.blur();
});
Take a look at the cancel option from the jquery-ui
$("#sortable").sortable(cancel: 'input');
You'll have to remove the $("#sortable").disableSelection();
See my jsfiddle
UPDATE
I understand your problem. Because jQuery stops the default functionality of the browser when sorting a list, the blur is never called for that field. You'll have to force the field to blur.
See my jsfiddle. I use change to call the blur, you can change 'change' to 'start' if you want the blur to always happen.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With