Skip to content
This repository
Browse code

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.
  • Loading branch information...
commit 70bd1ba3711f93a7bf95dda3d4bc664d69f71a02 1 parent cba80d9
Andri Möll authored johnbender committed

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  js/jquery.mobile.init.js
6  js/jquery.mobile.init.js
@@ -123,9 +123,9 @@
123 123
 		// so if it's 1, use 0 from now on
124 124
 		$.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;
125 125
 
126  
-		// dom-ready inits
127  
-		if ( $.mobile.autoInitializePage ) {
128  
-			$( $.mobile.initializePage );
  126
+		//dom-ready inits
  127
+		if( $.mobile.autoInitializePage ){
  128
+			$.mobile.initializePage();
129 129
 		}
130 130
 
131 131
 		// window load event

0 notes on commit 70bd1ba

Please sign in to comment.
Something went wrong with that request. Please try again.