Fixes flaw in JS, custom dropdowns now focus when invalid

This commit is contained in:
Sam Georges 2014-09-29 14:15:49 +10:00
parent 6363205f34
commit b37ba3ccfd
1 changed files with 9 additions and 4 deletions

View File

@ -51,9 +51,14 @@
formatSelection: formatSelectOption,
escapeMarkup: function(m) { return m; }
})
$(document).on('disable', 'select.custom-select', function(event, status){
$(this).select2('enable', !status)
})
})
$(document).on('disable', 'select.custom-select', function(event, status){
$(this).select2('enable', !status)
})
$(document).on('focus', 'select.custom-select', function(event){
setTimeout($.proxy(function() { $(this).select2('focus') }, this), 10)
})
})(jQuery);