From 5f2dd7ebfbe61abd218952ee2e658575149e0173 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Wed, 16 Apr 2014 23:42:10 +0300 Subject: [PATCH] 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 459bb59eff0306a345b0a23d76263a73582e7432) Closes gh-7325 Fixes gh-7322 --- js/jquery.mobile.helpers.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.helpers.js b/js/jquery.mobile.helpers.js index 9d1785ab5d9..52c66c0769a 100644 --- a/js/jquery.mobile.helpers.js +++ b/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() {