Parcourir la source

Fixed dragging handle remaining stucked until mouseleave

volpino il y a 11 ans
Parent
commit
e887adf1d8
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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');
                 });
               }
             });