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

Commit

Permalink
modified the resetActivePageHeight internal function so that it subtr…
Browse files Browse the repository at this point in the history
…acts top and bottom padding before setting the min-height amount. This fixes #3663. It may also influence issue #3556, so worth retesting.
  • Loading branch information
scottjehl committed Feb 29, 2012
1 parent 4a05277 commit 84f1e4f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/jquery.mobile.navigation.js
Expand Up @@ -522,7 +522,11 @@ define( [

//simply set the active page's minimum height to screen height, depending on orientation
function resetActivePageHeight(){
$( "." + $.mobile.activePageClass ).css( "min-height", getScreenHeight() );
var aPage = $( "." + $.mobile.activePageClass ),
aPagePadT = parseFloat( aPage.css( "padding-top" ) ),
aPagePadB = parseFloat( aPage.css( "padding-bottom" ) );

aPage.css( "min-height", getScreenHeight() - aPagePadT - aPagePadB );
}

//shared page enhancements
Expand Down

5 comments on commit 84f1e4f

@staabm
Copy link
Contributor

@staabm staabm commented on 84f1e4f Feb 29, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this depend on the css attribute "box-sizing"? e.g. border-box?

@scottjehl
Copy link

@scottjehl scottjehl commented on 84f1e4f Feb 29, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@staabm
Copy link
Contributor

@staabm staabm commented on 84f1e4f Feb 29, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will prepare a jsfiddle...

@scottjehl
Copy link

@scottjehl scottjehl commented on 84f1e4f Feb 29, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@staabm
Copy link
Contributor

@staabm staabm commented on 84f1e4f Feb 29, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so creating a fiddle will not make much sense, because it will also break in some other parts of the framework when using box-sizing different from default?

@scottjehl

Please sign in to comment.