From e72f905311faa4291d2b0e5c2342372dab48432a Mon Sep 17 00:00:00 2001 From: Wonseop Kim Date: Wed, 5 Jun 2013 17:08:51 +0900 Subject: [PATCH] fastscroll: Fix a position issue by auto scrolling. Fix a wrong position of the list of shortcuts caused by the auto scrolling. Resolves #N_SE-38680 Change-Id: I8ce5e46d89cb5bc684e5d91e708441c8ce8a33b5 --- src/js/widgets/jquery.mobile.tizen.fastscroll.js | 25 ++++++++---------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/src/js/widgets/jquery.mobile.tizen.fastscroll.js b/src/js/widgets/jquery.mobile.tizen.fastscroll.js index a9b3131..593dc70 100644 --- a/src/js/widgets/jquery.mobile.tizen.fastscroll.js +++ b/src/js/widgets/jquery.mobile.tizen.fastscroll.js @@ -165,7 +165,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) { var coords = $.mobile.tizen.targetRelativeCoordsFromEvent( e ), shortcutsListOffset = self.shortcutsList.offset(); - if ( self._isFadeOut === true ) { + if ( self._isFadeOut ) { return; } @@ -243,7 +243,7 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) { self.refresh(); } ); - self.scrollview.bind( "scrollstart", function ( e ) { + self.scrollview.bind( "scrollstart scrollupdate", function ( e ) { self._setTimer( false ); }).bind( "scrollstop", function ( e ) { self._setTimer( true ); @@ -459,20 +459,22 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) { }, _setTimer: function ( start ) { - var self = this; + var self = this, + shortcutsContainer = self.shortcutsContainer; - if ( start === true ) { + if ( start ) { self._timer = setTimeout( function () { self._isFadeOut = true; - self.shortcutsContainer.fadeOut( self._defaultDuration, function () { + shortcutsContainer.fadeOut( self._defaultDuration, function () { self._isFadeOut = false; }); }, self._defaultTime ); } else { if ( self._timer !== null ) { clearTimeout( self._timer ); + self._isFadeOut = false; } - self.shortcutsContainer.show(); + shortcutsContainer.show(); } }, @@ -538,15 +540,6 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) { return omitSet; }; - itemHandler = function ( e ) { - var text = $( this ).text(), - matchDivider = self._dividerMap[ text ]; - - if ( typeof matchDivider !== "undefined" ) { - $( matchDivider ).next().focus(); - } - }; - self._createDividerMap(); self.shortcutsList.find( 'li' ).remove(); @@ -600,8 +593,6 @@ define( [ '../jquery.mobile.tizen.scrollview' ], function ( ) { shortcutItem = $( '
  • .
  • ' ); shortcutItem.data( "omitSet", makeOmitSet( i, omitInfo[ omitIndex ] ) ); i += omitInfo[ omitIndex ] - 1; - } else { - shortcutItem.bind( 'vclick', itemHandler ); } shapItem.before( shortcutItem ); -- 2.7.4