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

.blur() on switch change only works one way

Open alextouzel opened this issue 8 years ago • 0 comments

I'm not sure if this is a bug or something I'm doing wrong, but I've tested many things and the problem remains. I need to remove focus from the bootstrap-switch once it's been clicked. This is what I'm doing in my javascript/jquery:

$('[name="my-checkbox"]').on('switchChange.bootstrapSwitch', function(event, state) { $( this ).blur(); });

Weirdly, it only works when I uncheck (or put the switch to off). The other way, the focus remains on the input element (I verified where the focus was in my console).

alextouzel avatar Dec 05 '16 03:12 alextouzel