Keyboard orientation and media query bug (app mode)

前端 未结 3 1184
礼貌的吻别
礼貌的吻别 2021-01-20 04:13
  1. Add this webpage to your iOS7 home screen
  2. Open it, and focus the input field (the keyboard pops up)
  3. The text turns red, as the phone thinks it is in
3条回答
  •  野性不改
    2021-01-20 04:32

    innerHeight is now affected by the keyboard being up in iOS7. If you check the innerHeight vs innerWidth with the keyboard up when the device is in portrait you will find that the innerHeight < innerWidth so maybe the browser's orientation check is as simple as that instead of using the device orientation straight up.

提交回复
热议问题