Export 0.1.45
[framework/web/web-ui-fw.git] / src / widgets / common / js / jquery.mobile.tizen.scrollview.js
index 6bc7f04..08ff149 100644 (file)
@@ -35,7 +35,7 @@
        };
 
        function getCurrentTime() {
-               return ( new Date() ).getTime();
+               return Date.now();
        }
 
        jQuery.widget( "tizen.scrollview", jQuery.mobile.widget, {
                                        target.is( '.ui-btn-inner' ) ||
                                        target.is( '.ui-btn-inner .ui-icon' );
 
+                       if ( this._is_button ) {
+                               if ( target.parents('.ui-slider-handle') ) {
+                                       this._skip_dragging = true;
+                                       return;
+                               }
+                       }
+
                        /*
                         * We need to prevent the default behavior to
                         * suppress accidental selection of text, etc.
                                        focused.trigger("resize.scrollview");
                                }
 
-                               /* calibration */
-                               if ( self._sy < $c.height() - $v.height() ) {
-                                       self.scrollTo( 0, self._sy,
-                                               self.options.snapbackDuration );
-                               }
+                               /* calibration - after triggered throttledresize */
+                               setTimeout( function () {
+                                       if ( self._sy < $c.height() - $v.height() ) {
+                                               self.scrollTo( 0, self._sy,
+                                                       self.options.snapbackDuration );
+                                       }
+                               }, 260 );
 
                                self._view_height = $v.height();
                        });