开发者

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:

  1. Go to http:// daedalus.rcboyce.com/viewport/
  2. Resize to 980 (iPhone's default)
  3. Resize to 320 (works)
  4. Res开发者_如何转开发ize back to 980
  5. Go to landscape mode
  6. Go to portrait mode back again
  7. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜