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

Commit b39787b

Browse files
committed
Move $.mobile.resetActivePageHeight from navigation to core. Fixes #5997 - Panel depends on resetActivePageHeight
1 parent ed1d5f8 commit b39787b

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

js/jquery.mobile.core.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,17 @@ define( [ "jquery", "./jquery.mobile.ns", "json!../package.json" ], function( jQ
246246
// Native innerHeight returns more accurate value for this across platforms,
247247
// jQuery version is here as a normalized fallback for platforms like Symbian
248248
return window.innerHeight || $.mobile.window.height();
249+
},
250+
251+
//simply set the active page's minimum height to screen height, depending on orientation
252+
resetActivePageHeight: function( height ) {
253+
var aPage = $( "." + $.mobile.activePageClass ),
254+
aPageHeight = aPage.height(),
255+
aPageOuterHeight = aPage.outerHeight( true );
256+
257+
height = ( typeof height === "number" ) ? height : $.mobile.getScreenHeight();
258+
259+
aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
249260
}
250261
});
251262

js/jquery.mobile.navigation.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ define( [
9797
//initial value. If a base tag does not exist, then we default to the documentUrl.
9898
documentBase = path.documentBase,
9999

100-
getScreenHeight = $.mobile.getScreenHeight,
101-
102100
//base element management, defined depending on dynamic base tag support
103101
base = {
104102
//define base element, for use in routing asset urls that are referenced in Ajax-requested markup
@@ -307,17 +305,6 @@ define( [
307305
return promise;
308306
}
309307

310-
//simply set the active page's minimum height to screen height, depending on orientation
311-
$.mobile.resetActivePageHeight = function resetActivePageHeight( height ) {
312-
var aPage = $( "." + $.mobile.activePageClass ),
313-
aPageHeight = aPage.height(),
314-
aPageOuterHeight = aPage.outerHeight( true );
315-
316-
height = ( typeof height === "number" ) ? height : getScreenHeight();
317-
318-
aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
319-
};
320-
321308
//shared page enhancements
322309
function enhancePage( $page, role ) {
323310
// If a role was specified, make sure the data-role attribute

0 commit comments

Comments
 (0)