From 5457737d6f403926e0970ef572a06223b734f149 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Tue, 15 Jan 2013 11:13:27 +0900 Subject: [PATCH] scrollview: block the multi touch There are no UX for the multi-touch on scrollview, and since the multi-touch generates unexpected behavior, block this event. Change-Id: If3b9811bd8812f4ab1bd1b7e77dc1c289a7ec45d --- .../common/js/jquery.mobile.tizen.scrollview.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/widgets/common/js/jquery.mobile.tizen.scrollview.js b/src/widgets/common/js/jquery.mobile.tizen.scrollview.js index addd0e4..4bd7756 100644 --- a/src/widgets/common/js/jquery.mobile.tizen.scrollview.js +++ b/src/widgets/common/js/jquery.mobile.tizen.scrollview.js @@ -961,20 +961,30 @@ this._dragEvt = "touchstart touchmove touchend click"; this._dragCB = function ( e ) { - var t; + var touches = e.originalEvent.touches; switch ( e.type ) { case "touchstart": - t = e.originalEvent.targetTouches[0]; + if ( touches.length != 1) { + return; + } + return self._handleDragStart( e, - t.pageX, t.pageY ); + touches[0].pageX, touches[0].pageY ); case "touchmove": - t = e.originalEvent.targetTouches[0]; + if ( touches.length != 1) { + return; + } + return self._handleDragMove( e, - t.pageX, t.pageY ); + touches[0].pageX, touches[0].pageY ); case "touchend": + if ( touches.length != 0) { + return; + } + return self._handleDragStop( e ); case "click": -- 2.7.4