Explorar o código

fixed double event triggering if selector is id #317

LostCrew %!s(int64=11) %!d(string=hai) anos
pai
achega
52c291dd5c

+ 1 - 0
dist/js/bootstrap-switch.js

@@ -452,6 +452,7 @@
           })(this),
           "click.bootstrapSwitch": (function(_this) {
             return function(e) {
+              e.preventDefault();
               _this.toggleState();
               return _this.$element.trigger("focus.bootstrapSwitch");
             };

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/js/bootstrap-switch.min.js


+ 2 - 0
src/coffee/bootstrap-switch.coffee

@@ -342,6 +342,8 @@ do ($ = window.jQuery, window) ->
           @$label.trigger "mouseup.bootstrapSwitch"
 
         "click.bootstrapSwitch": (e) =>
+          e.preventDefault()
+
           @toggleState()
           @$element.trigger "focus.bootstrapSwitch"
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio