瀏覽代碼

Fixed dragging handle remaining stucked until mouseleave

volpino 11 年之前
父節點
當前提交
e887adf1d8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      static/js/bootstrap-switch.js

+ 2 - 2
static/js/bootstrap-switch.js

@@ -209,7 +209,7 @@
                   e.preventDefault();
                   e.stopImmediatePropagation();
 
-                  $this.unbind('mouseleave');
+                  $this.unbind('mouseleave mousemove');
                   $this.trigger('mouseup');
 
                   $myInputBox.prop('checked', !(parseInt($this.parent().css('left')) < -25)).trigger('change');
@@ -219,7 +219,7 @@
                   e.stopImmediatePropagation();
                   e.preventDefault();
 
-                  $(this).unbind('mousemove');
+                  $(this).trigger('mouseleave');
                 });
               }
             });