Permalink
Browse files

Helpers: Make resetActivePageHeight() less aggressive

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...
1 parent 5048010 commit 5f2dd7ebfbe61abd218952ee2e658575149e0173 @gabrielschulhof gabrielschulhof committed Apr 16, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 js/jquery.mobile.helpers.js
@@ -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() {

0 comments on commit 5f2dd7e

Please sign in to comment.