iOS return bad value for window.innerHeight/Width

前端 未结 8 2048
悲哀的现实
悲哀的现实 2020-12-15 16:13

I\'m using window.innerHeight and window.innerWidth instructions to get the browser\'s available window size. It\'s working with firefox, safari (on a mac

8条回答
  •  隐瞒了意图╮
    2020-12-15 16:24

    Same issue still. I have a full screen app, no need for user to scale anything (it's a kiosk), and solution for me was adding the shrink-to-fit=no meta.

    My current meta for the viewport is:

    Now window.innerWidth, jQuery(window).width() and everything else related works properly. Before that, I had to rotate iPad and return it back to original position for window size values to refresh to the proper ones.

提交回复
热议问题