bootstrap-select icon indicating copy to clipboard operation
bootstrap-select copied to clipboard

Blur Event still broken

Open gravesmedical opened this issue 11 years ago • 2 comments

.blur does not fire still for me, I cited it in another issue, where someone posted a jsfiddle.

Anyone having any luck?

-Mark

gravesmedical avatar Jan 24 '15 11:01 gravesmedical

@gravesmedical

While the blur event does not event does not appear to work, it may be acceptable to use the hidden.bs.dropdown event fired by Bootstrap's dropdown component, since this plugin makes use of that. This would have to be registered after the bootstrap-select has been initialized.

$('.bootstrap-select').on('hidden.bs.dropdown', function () {
    console.log('hidden');
});

http://jsfiddle.net/sn7zrLdb/1/

jakezatecky avatar Jul 09 '15 20:07 jakezatecky

If using bootstrap-select >v1.7.0, it would be better to use:

$('#boo').on('hidden.bs.select', function () {
    console.log('hidden');
});

Alternatively, if you really need to use blur, you need to use the button as the element - not the dropdown container. e.g.:

$(".boo .dropdown-toggle").blur(function() {
    alert(2);
});

caseyjhol avatar Jul 09 '15 21:07 caseyjhol