1 From 294d4afac6c0e00dd1489ad8b23cde0bae0cf459 Mon Sep 17 00:00:00 2001
2 From: Minkyu Kang <mk7.kang@samsung.com>
3 Date: Mon, 26 Nov 2012 19:41:07 +0900
4 Subject: [PATCH] JQM: Prevent blinking on page transition
6 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
7 Signed-off-by: Youmin Ha <youmin.ha@samsung.com>
9 .../js/jquery.mobile.transition.js | 9 +++++++++
10 1 file changed, 9 insertions(+)
12 diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.transition.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.transition.js
13 index 8eb43b0..cb7c9a7 100644
14 --- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.transition.js
15 +++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.transition.js
16 @@ -31,6 +31,15 @@ var createHandler = function( sequential ) {
17 $.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
19 scrollPage = function() {
20 + // Prevent blinking on page scrolling in Tizen/Android devices.
21 + // Don't scoll window, when current scroll top(scrollTop()) is already at toScroll,
22 + // or when current scroll top is 0 and toScroll is same to defaultHomeScroll
23 + // (which means the top position of page). In these case, page scrolling is not needed.
24 + var st = $( window ).scrollTop();
25 + if( st === toScroll || ( $.mobile.defaultHomeScroll === toScroll && st == 0 ) ) {
29 // By using scrollTo instead of silentScroll, we can keep things better in order
30 // Just to be precautios, disable scrollstart listening like silentScroll would
31 $.event.special.scrollstart.enabled = false;