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

Commit 5e79f5e

Browse files
committed
resolve the nav ready deferred after the page container has been created Fixes #5284
1 parent 576714f commit 5e79f5e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

js/jquery.mobile.init.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ define([
7979
// define page container
8080
$.mobile.pageContainer = $.mobile.firstPage.parent().addClass( "ui-mobile-viewport" );
8181

82+
// initialize navigation events now, after mobileinit has occurred and the page container
83+
// has been created but before the rest of the library is alerted to that fact
84+
$.mobile.navreadyDeferred.resolve();
85+
8286
// alert listeners that the pagecontainer has been determined for binding
8387
// to events triggered on it
8488
$window.trigger( "pagecontainercreate" );
@@ -131,9 +135,6 @@ define([
131135
}
132136
});
133137

134-
// initialize events now, after mobileinit has occurred
135-
$.mobile.navreadyDeferred.resolve();
136-
137138
// check which scrollTop value should be used by scrolling to 1 immediately at domready
138139
// then check what the scroll top is. Android will report 0... others 1
139140
// note that this initial scroll won't hide the address bar. It's just for the check.

0 commit comments

Comments
 (0)