From ffa35c0548c20cbfa2bb0785e23e0bfc8885566b Mon Sep 17 00:00:00 2001 From: scottjehl Date: Fri, 17 Jun 2011 16:58:21 -0400 Subject: [PATCH] improved minheight page logic --- js/jquery.mobile.navigation.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 5a042f12..aca58ee8 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -453,9 +453,12 @@ //simply set the active page's minimum height to screen height, depending on orientation function resetActivePageHeight(){ - var height = jQuery.event.special.orientationchange.orientation() === "portrait" ? screen.height : screen.width, - winHeight = $( window ).height(), - pageMin = Math.min( height, winHeight ); + var orientation = jQuery.event.special.orientationchange.orientation(), + port = orientation === "portrait", + winMin = port ? 480 : 320, + screenHeight = port ? screen.height : screen.width, + winHeight = Math.max( winMin, $( window ).height() ), + pageMin = Math.min( screenHeight, winHeight ); $( ".ui-page-active" ).css( "min-height", pageMin ); }