From 70bd1ba3711f93a7bf95dda3d4bc664d69f71a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andri=20M=C3=B6ll?= Date: Mon, 25 Jul 2011 15:23:10 -0700 Subject: [PATCH] Fix nested waiting-for-dom for initializePage. Using dom-ready within dom-ready meant that initializePage went to the end of the queue. That brought problems when other dom-ready code expected jQM to be set up, capable of changing pages and so on. But because $.mobile.pageContainer is also set in initializePage, changePage and others didn't work. --- js/jquery.mobile.init.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.init.js b/js/jquery.mobile.init.js index ff8cb6d6..67d4fd98 100644 --- a/js/jquery.mobile.init.js +++ b/js/jquery.mobile.init.js @@ -123,9 +123,9 @@ // so if it's 1, use 0 from now on $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1; - // dom-ready inits - if ( $.mobile.autoInitializePage ) { - $( $.mobile.initializePage ); + //dom-ready inits + if( $.mobile.autoInitializePage ){ + $.mobile.initializePage(); } // window load event