1 From 6c13cc110b8efa21a98823a3d481e52ff710b12c Mon Sep 17 00:00:00 2001
2 From: Minkyu Kang <mk7.kang@samsung.com>
3 Date: Mon, 26 Nov 2012 19:58:57 +0900
4 Subject: [PATCH] JQM: add event blocker when load a first page
6 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
8 .../jquery-mobile-1.2.0/js/jquery.mobile.init.js | 13 +++++++++++++
9 .../js/jquery.mobile.navigation.js | 4 ++++
10 2 files changed, 17 insertions(+)
12 diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.init.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.init.js
13 index 4ff7a54..52f6434 100644
14 --- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.init.js
15 +++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.init.js
16 @@ -41,6 +41,18 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
17 setTimeout( hideRenderingClass, 5000 );
20 + addEventBlocker: function () {
21 + $html.addClass( "ui-blocker" );
22 + $html.bind( "touchstart touchend vclick mousedown mouseup click", function () {
27 + removeEventBlocker: function () {
28 + $html.removeClass( "ui-blocker" );
29 + $html.unbind( "touchstart touchend vclick mousedown mouseup click" );
32 // find and enhance the pages in the dom and transition to the first page.
33 initializePage: function() {
35 @@ -75,6 +87,7 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
37 // cue page loading message
38 $.mobile.showPageLoadingMsg();
39 + $.mobile.addEventBlocker();
41 //remove initial build class (only present on first pageshow)
43 diff --git a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js
44 index 8172d32..9048789 100644
45 --- a/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js
46 +++ b/libs/js/jquery-mobile-1.2.0/js/jquery.mobile.navigation.js
47 @@ -570,6 +570,10 @@ define( [
49 //trigger pageshow, define prevPage as either fromPage or empty jQuery obj
50 toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
52 + setTimeout( function () {
53 + $.mobile.removeEventBlocker();