Преглед на файлове

fixed double event triggering if selector is id #317

LostCrew преди 11 години
родител
ревизия
52c291dd5c
променени са 3 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 1 0
      dist/js/bootstrap-switch.js
  2. 0 0
      dist/js/bootstrap-switch.min.js
  3. 2 0
      src/coffee/bootstrap-switch.coffee

+ 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");
             };

Файловите разлики са ограничени, защото са твърде много
+ 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"
 

Някои файлове не бяха показани, защото твърде много файлове са промени