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

Commit 509f3b4

Browse files
Navigation: reduced code of resetActivePageHeight() and made it take margin into account as well.
1 parent 943bf89 commit 509f3b4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

js/jquery.mobile.navigation.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,12 @@ define( [
290290
//simply set the active page's minimum height to screen height, depending on orientation
291291
$.mobile.resetActivePageHeight = function resetActivePageHeight( height ) {
292292
var aPage = $( "." + $.mobile.activePageClass ),
293-
aPagePadT = parseFloat( aPage.css( "padding-top" ) ),
294-
aPagePadB = parseFloat( aPage.css( "padding-bottom" ) ),
295-
aPageBorderT = parseFloat( aPage.css( "border-top-width" ) ),
296-
aPageBorderB = parseFloat( aPage.css( "border-bottom-width" ) );
293+
aPageHeight = aPage.height(),
294+
aPageOuterHeight = aPage.outerHeight( true );
297295

298-
height = ( typeof height === "number" )? height : getScreenHeight();
296+
height = ( typeof height === "number" ) ? height : getScreenHeight();
299297

300-
aPage.css( "min-height", height - aPagePadT - aPagePadB - aPageBorderT - aPageBorderB );
298+
aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
301299
};
302300

303301
//shared page enhancements

0 commit comments

Comments
 (0)