Permalink
Browse files

fixed slider bug

  • Loading branch information...
1 parent 8380cc2 commit 766dcf98e4c9bd371edfd4bd113d21a34033e6a6 @furf committed Dec 15, 2011
Showing with 6 additions and 6 deletions.
  1. +1 −1 README.md
  2. +2 −2 jquery.ui.touch-punch.js
  3. +3 −3 jquery.ui.touch-punch.min.js
View
@@ -23,7 +23,7 @@ Include touch punch after jQuery UI and before its first usage.
```html
<script src="http://code.jquery.com/jquery.min.js"></script>
-<script src="http://code.jquery.com/ui/1.8.16/jquery-ui.min.js"></script>
+<script src="http://code.jquery.com/ui/1.8.17/jquery-ui.min.js"></script>
<script src="jquery.ui.touch-punch.min.js"></script>
<script>
$('#widget').draggable();
View
@@ -1,5 +1,5 @@
/*!
- * jQuery UI Touch Punch 0.2.1
+ * jQuery UI Touch Punch 0.2.2
*
* Copyright 2011, Dave Furfero
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -71,7 +71,7 @@
var self = this;
// Ignore the event if another widget is already being handled
- if (touchHandled || !self._mouseCapture(event)) {
+ if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
return;
}
@@ -1,5 +1,5 @@
-/*!
- * jQuery UI Touch Punch 0.2.1
+/*
+ * jQuery UI Touch Punch 0.2.2
*
* Copyright 2011, Dave Furfero
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -8,4 +8,4 @@
* jquery.ui.widget.js
* jquery.ui.mouse.js
*/
-(function(a){function e(a,b){if(a.originalEvent.touches.length>1)return;a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}a.support.touch="ontouchend"in document;if(!a.support.touch)return;var b=a.ui.mouse.prototype,c=b._mouseInit,d;b._touchStart=function(a){var b=this;if(d||!b._mouseCapture(a))return;d=!0,b._touchMoved=!1,e(a,"mouseover"),e(a,"mousemove"),e(a,"mousedown")},b._touchMove=function(a){if(!d)return;this._touchMoved=!0,e(a,"mousemove")},b._touchEnd=function(a){if(!d)return;e(a,"mouseup"),e(a,"mouseout"),this._touchMoved||e(a,"click"),d=!1},b._mouseInit=function(){var b=this;b.element.bind("touchstart",a.proxy(b,"_touchStart")).bind("touchmove",a.proxy(b,"_touchMove")).bind("touchend",a.proxy(b,"_touchEnd")),c.call(b)}})(jQuery);
+(function(b){b.support.touch="ontouchend" in document;if(!b.support.touch){return;}var c=b.ui.mouse.prototype,e=c._mouseInit,a;function d(g,h){if(g.originalEvent.touches.length>1){return;}g.preventDefault();var i=g.originalEvent.changedTouches[0],f=document.createEvent("MouseEvents");f.initMouseEvent(h,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);g.target.dispatchEvent(f);}c._touchStart=function(g){var f=this;if(a||!f._mouseCapture(g.originalEvent.changedTouches[0])){return;}a=true;f._touchMoved=false;d(g,"mouseover");d(g,"mousemove");d(g,"mousedown");};c._touchMove=function(f){if(!a){return;}this._touchMoved=true;d(f,"mousemove");};c._touchEnd=function(f){if(!a){return;}d(f,"mouseup");d(f,"mouseout");if(!this._touchMoved){d(f,"click");}a=false;};c._mouseInit=function(){var f=this;f.element.bind("touchstart",b.proxy(f,"_touchStart")).bind("touchmove",b.proxy(f,"_touchMove")).bind("touchend",b.proxy(f,"_touchEnd"));e.call(f);};})(jQuery);

0 comments on commit 766dcf9

Please sign in to comment.