scrollview: block the multi touch
authorMinkyu Kang <mk7.kang@samsung.com>
Tue, 15 Jan 2013 02:13:27 +0000 (11:13 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 15 Jan 2013 07:22:07 +0000 (16:22 +0900)
There are no UX for the multi-touch on scrollview,
and since the multi-touch generates unexpected behavior, block this event.

Change-Id: If3b9811bd8812f4ab1bd1b7e77dc1c289a7ec45d

src/widgets/common/js/jquery.mobile.tizen.scrollview.js

index addd0e4..4bd7756 100644 (file)
                                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":