1 From 90c6c1dae398b40abfd2f9325bd1ed57ecd69178 Mon Sep 17 00:00:00 2001
2 From: Minkyu Kang <mk7.kang@samsung.com>
3 Date: Wed, 26 Sep 2012 14:34:50 +0900
4 Subject: [PATCH] JQM: add event blocker when load a first page
6 Change-Id: I4b159977e158cf8358bdd118682b8291e3adb6d8
7 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
9 .../jquery-mobile-1.1.0/js/jquery.mobile.init.js | 13 +++++++++++++
10 .../js/jquery.mobile.navigation.js | 4 ++++
11 2 files changed, 17 insertions(+)
13 diff --git a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js
14 index 93c03e8..54c4615 100644
15 --- a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js
16 +++ b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.init.js
17 @@ -106,6 +106,18 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
18 $( window ).unbind( "scroll", checkLoaderPosition );
21 + addEventBlocker: function () {
22 + $html.addClass( "ui-blocker" );
23 + $html.bind( "touchstart touchend vclick mousedown mouseup click", function () {
28 + removeEventBlocker: function () {
29 + $html.removeClass( "ui-blocker" );
30 + $html.unbind( "touchstart touchend vclick mousedown mouseup click" );
33 // find and enhance the pages in the dom and transition to the first page.
34 initializePage: function() {
36 @@ -138,6 +150,7 @@ define( [ "jquery", "./jquery.mobile.core", "./jquery.mobile.support", "./jquery
38 // cue page loading message
39 $.mobile.showPageLoadingMsg();
40 + $.mobile.addEventBlocker();
42 //remove initial build class (only present on first pageshow)
44 diff --git a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js
45 index f6e11b3..841e8a9 100644
46 --- a/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js
47 +++ b/libs/js/jquery-mobile-1.1.0/js/jquery.mobile.navigation.js
48 @@ -529,6 +529,10 @@ define( [
50 //trigger pageshow, define prevPage as either fromPage or empty jQuery obj
51 toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
53 + setTimeout( function () {
54 + $.mobile.removeEventBlocker();