Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


iPhone : Page Min Height not set correctly #3379

lijumathews opened this Issue · 8 comments

5 participants


When you have a page with content not enough to fill the screen, we have the page extending outside the actual safari view port.
The getScreenHeight(); I guess is calculating the actual screen height of the iPhone without taking into account the safari footer bar.
The page fits into the correct safari height if we change line 2517

winMin = port ? 480 : 320,
winMin = port ? 422 : 320,

As seen above when I changed the value from 480 to 420, it sets the correct page height. This can been seen on any jQuery Mobile site.

There are others with the same issue :
Please Advice.


When looking into #2933 I noticed it was using screen.availHeight, when it should probably be using document.documentElement.clientHeight.


@jblas thanks for looking at it. I tried using document.documentElement.clientHeight but it doesn't take into consideration the height of the address bar so when the address bar auto hides there is a good 64px of white space below. Any suggestions to fix that?


Oh thank the gods someone rooted out the source of the problem. This has driven me to the edge of insanity this past week – I only had an iphone to test on, and amending that code immediately fixed it. This would definitely be nice to address.


Is this still and issue in 1.1.0? We did a bunch of fixes for this so I think this should be working correctly now. If not, can you provide a test page for us to review? Template using latest here:


Before you go testing... there is a typo in the viewport meta tag of that fiddle (initial-scale="1"" instead of initial-scale=1")

@toddparker time for a new fiddle? ;-)


@uGoMobi - I think that does work but it's a bit ugly. Here is a a new bin:


Bah, just noticed my template was a bit out of date and referenced 1.6.4 instead of 1.7.1:


Closing this one since we don't set the min-height this way anymore as from 1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.