From 8108009ba7f47e3b7eb58e62b3a6a0e280e29b07 Mon Sep 17 00:00:00 2001 From: "ethan.li" Date: Tue, 9 Jul 2013 11:07:18 +1000 Subject: [PATCH 1/2] fix issue: onTouchEnd did not call the correct mouse up handler --- src/mousetracker.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mousetracker.js b/src/mousetracker.js index c7a937f4..22596eb7 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -789,7 +789,13 @@ event.changedTouches.length == 1 ){ THIS[ tracker.hash ].lastTouch = null; - onMouseUp( tracker, event.changedTouches[ 0 ] ); + + if ($.Browser.vendor == $.BROWSERS.IE && $.Browser.version < 9) { + onMouseUpIE(tracker, event); + } else { + onMouseUpWindow(tracker, event); + } + onMouseOut( tracker, event.changedTouches[ 0 ] ); } if( event.touches.length + event.changedTouches.length == 2 ){ From 0ef98be0b7df9acf3c85396f7bb9dcbe61963c24 Mon Sep 17 00:00:00 2001 From: "ethan.li" Date: Fri, 12 Jul 2013 10:29:44 +1000 Subject: [PATCH 2/2] for fix I made to onTouchEnd: 1. remove IE8 related code as it does not support touch anyway 2. use event.changedTouches [ 0 ] rather than event --- src/mousetracker.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/mousetracker.js b/src/mousetracker.js index 22596eb7..b3d15737 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -790,12 +790,7 @@ THIS[ tracker.hash ].lastTouch = null; - if ($.Browser.vendor == $.BROWSERS.IE && $.Browser.version < 9) { - onMouseUpIE(tracker, event); - } else { - onMouseUpWindow(tracker, event); - } - + onMouseUpWindow( tracker, event.changedTouches[ 0 ] ); onMouseOut( tracker, event.changedTouches[ 0 ] ); } if( event.touches.length + event.changedTouches.length == 2 ){