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

Commit

Permalink
Helpers: Make resetActivePageHeight() less aggressive
Browse files Browse the repository at this point in the history
Do not set min-height if the existing height is good enough.
This fixes iOS 6.1, but not WP8.

(cherry picked from commit 459bb59)

Closes gh-7325
Fixes gh-7322
  • Loading branch information
Gabriel Schulhof committed Apr 24, 2014
1 parent 5048010 commit 5f2dd7e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/jquery.mobile.helpers.js
Expand Up @@ -172,7 +172,13 @@ define( [ "jquery", "./jquery.mobile.ns", "jquery-ui/jquery.ui.core" ], function
height = compensateToolbars( page,
( typeof height === "number" ) ? height : $.mobile.getScreenHeight() );

page.css( "min-height", height - ( pageOuterHeight - pageHeight ) );
// Remove any previous min-height setting
page.css( "min-height", "" );

// Set the minimum height only if the height as determined by CSS is insufficient
if ( page.height() < height ) {
page.css( "min-height", height - ( pageOuterHeight - pageHeight ) );
}
},

loading: function() {
Expand Down

0 comments on commit 5f2dd7e

Please sign in to comment.