mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-19 12:01:06 +00:00
improved minheight page logic
This commit is contained in:
parent
fcbfc2f380
commit
ffa35c0548
1 changed files with 6 additions and 3 deletions
|
|
@ -453,9 +453,12 @@
|
||||||
|
|
||||||
//simply set the active page's minimum height to screen height, depending on orientation
|
//simply set the active page's minimum height to screen height, depending on orientation
|
||||||
function resetActivePageHeight(){
|
function resetActivePageHeight(){
|
||||||
var height = jQuery.event.special.orientationchange.orientation() === "portrait" ? screen.height : screen.width,
|
var orientation = jQuery.event.special.orientationchange.orientation(),
|
||||||
winHeight = $( window ).height(),
|
port = orientation === "portrait",
|
||||||
pageMin = Math.min( height, winHeight );
|
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 );
|
$( ".ui-page-active" ).css( "min-height", pageMin );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue