Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
resolve the nav ready deferred after the page container has been crea…
Browse files Browse the repository at this point in the history
…ted Fixes #5284
  • Loading branch information
johnbender committed Apr 16, 2013
1 parent 576714f commit 5e79f5e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/jquery.mobile.init.js
Expand Up @@ -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" );
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 5e79f5e

Please sign in to comment.