From 6b386f470e08d9d325a80dd1abd526c21d72ac33 Mon Sep 17 00:00:00 2001 From: Woosung Sohn Date: Tue, 5 Feb 2013 15:18:01 +0900 Subject: [PATCH] virtualgrid: changes event binding target When Virtualgrid is in the nested-scrollview structure, Virtualgrid doesn't handle touch events properly. This patch changes touch-related event binding targets, and fixes wrong usage of a scrollview Virtualgrid contains. (TDIS-2643, TDIS-2644, TDIS-2645) Change-Id: I6f11a80c295f72e4a283d870697c600a64f45a33 --- .../virtualgrid/js/jquery.mobile.tizen.virtualgrid.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js b/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js index b0a6796..5c1c4b5 100644 --- a/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js +++ b/src/widgets/virtualgrid/js/jquery.mobile.tizen.virtualgrid.js @@ -969,13 +969,17 @@ }, _enableTracking: function () { - $(document).bind( this._dragMoveEvt, this._dragMoveCB ); - $(document).bind( this._dragStopEvt, this._dragStopCB ); + var self = this; + self._$view.bind( self._dragMoveEvt, self._dragMoveCB ); + self._$view.bind( self._dragStopEvt, self._dragStopCB ); + self._scrollView._enableTracking.apply( self ); }, _disableTracking: function () { - $(document).unbind( this._dragMoveEvt, this._dragMoveCB ); - $(document).unbind( this._dragStopEvt, this._dragStopCB ); + var self = this; + self._$view.unbind( self._dragMoveEvt, self._dragMoveCB ); + self._$view.unbind( self._dragStopEvt, self._dragStopCB ); + self._scrollView._disableTracking.apply( self ); }, _handleDragStart: function ( e, ex, ey ) { -- 2.7.4