Bug when changing iPhone viewport with javascript
I'm building a web iPhone app that involves changing the viewport on demand with Javascript. I do this by changing the content attribute of the tag. This works well most of the times, except when orientation change is involved.
Everytime I try to change the viewport after an orientation change event, the page doesn't zoom to it's full size anymore, and a checkered background appears.
Here's a way to reproduce this:
- Go to http:// daedalus.rcboyce.com/viewport/
- Resize to 980 (iPhone's default)
- Resize to 320 (works)
- Res开发者_如何转开发ize back to 980
- Go to landscape mode
- Go to portrait mode back again
- Resize to 320 (fails every time I tried)
Here's a screenshot of how it looks: http://tinypic.com/r/15qyzoh/6
Does anybody have any ideea why this is happening? Is this a MobileSafari bug, and if so, is there anyway to fix it?
I'm sorry, but I don't see a button or link to add a comment...
I just submitted a bug report to apple because the viewport changes stop responding even after a user pinches, not just orientation change. I personally know a safari engineer and he knows some of the mobile safari people and he is going to ask them about it, or at least bring it to their attention
精彩评论