Permalink
Browse files

resolve the nav ready deferred after the page container has been crea…

…ted Fixes #5284
  • Loading branch information...
johnbender committed Apr 16, 2013
1 parent 576714f commit 5e79f5e95a6fc1f10539e8655964ec53b1b0b40b
Showing with 4 additions and 3 deletions.
  1. +4 −3 js/jquery.mobile.init.js
View
@@ -79,6 +79,10 @@ define([
// define page container
$.mobile.pageContainer = $.mobile.firstPage.parent().addClass( "ui-mobile-viewport" );
+ // initialize navigation events now, after mobileinit has occurred and the page container
+ // has been created but before the rest of the library is alerted to that fact
+ $.mobile.navreadyDeferred.resolve();
+
// alert listeners that the pagecontainer has been determined for binding
// to events triggered on it
$window.trigger( "pagecontainercreate" );
@@ -131,9 +135,6 @@ define([
}
});
- // initialize events now, after mobileinit has occurred
- $.mobile.navreadyDeferred.resolve();
-
// check which scrollTop value should be used by scrolling to 1 immediately at domready
// then check what the scroll top is. Android will report 0... others 1
// note that this initial scroll won't hide the address bar. It's just for the check.

0 comments on commit 5e79f5e

Please sign in to comment.