소스 검색

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"
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.