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

Events not handled

Open anthonyrossetto opened this issue 10 years ago • 1 comments

Hi,

I saw that in certain cases, the events are not handled correctly.

The bug is located here :

      BootstrapSwitch.prototype._elementHandlers = function() {
        return this.$label.on({

You can fix this bug by using the following code instead :

      BootstrapSwitch.prototype._elementHandlers = function() {
        return this.$container.on({

Regards

anthonyrossetto avatar Feb 19 '16 21:02 anthonyrossetto

Line 642: insert code below

//mod
var isCurrentChecked = _this.$element.is(':checked');
if (isCurrentChecked === state)
    state = !state;

vuca89 avatar Jan 13 '17 03:01 vuca89