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

Commit 459bb59

Browse files
author
Gabriel Schulhof
committed
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. Closes gh-7325 Fixes gh-7322
1 parent 7d80cbd commit 459bb59

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

js/helpers.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,13 @@ define( [ "jquery", "./ns", "jquery-ui/jquery.ui.core" ], function( jQuery ) {
172172
height = compensateToolbars( page,
173173
( typeof height === "number" ) ? height : $.mobile.getScreenHeight() );
174174

175-
page.css( "min-height", height - ( pageOuterHeight - pageHeight ) );
175+
// Remove any previous min-height setting
176+
page.css( "min-height", "" );
177+
178+
// Set the minimum height only if the height as determined by CSS is insufficient
179+
if ( page.height() < height ) {
180+
page.css( "min-height", height - ( pageOuterHeight - pageHeight ) );
181+
}
176182
},
177183

178184
loading: function() {

0 commit comments

Comments
 (0)