2

So I am having an issue with JQM and device rotation on the iOS products. When the user spins the screen, it doesn't resize to fill. I have this line in the head which handles the display size:

    <meta name="viewport" content="height=device-height,width=device-width,initial-scale=1.0,maximum-scale=1.0" >

Does anyone know why the iPhones are not handling the screen rotation properly? It works fine on my android.

gabaum10
  • 3,769
  • 3
  • 48
  • 89

1 Answers1

3

Figured it out lol.

in my head, I was doing this:

<meta name="viewport" content="height=device-height,width=device-width,initial scale=1.0,maximum-scale=1.0" >

to this:

<meta name="viewport" content="initial-scale=1, maximum-scale=1">

Boneheaded mistake. Hopefully that helps some of you guys out.

gabaum10
  • 3,769
  • 3
  • 48
  • 89
  • 1
    To scale properly for all device screen sizes you should add `width=device-width` to your new `viewport` tag. – Jasper Feb 01 '12 at 23:24
  • Will that break the rotation on the iPhone? That's where I was finding the problem... – gabaum10 Feb 02 '12 at 14:03
  • 1
    I had this issue a while back and I use this `viewport` tag: ``. I found that by removing the `height=device-height` that orientation changes happen as expected. I also found that if you have `height=device-height` in your `viewport` tag that you can fix the iOS orientation-change problem by switching the height/width values in the `viewport` tag on `orientationchange`. – Jasper Feb 02 '12 at 17:23