Prevent orientation change in iOS Safari

前端 未结 9 1554
死守一世寂寞
死守一世寂寞 2020-11-28 02:56

Is it possible to avoid transition to landscape view in Safari for iOS when the device is rotated?

iOS Safari has the \"orentationchange\" event, I tried to intercep

9条回答
  •  清歌不尽
    2020-11-28 03:54

    If it is possible (which I don't believe it is), then I'd strongly advise against it. Users hate being forced into viewing pages in a particular way. What if they're using their iphone in a dock and can't stand it in landscape mode without undocking it, or what if they prefer the landscape version of the keyboard because the keys are bigger?

    If your design requires a particular orientation then you might want to rethink your design.

提交回复
热议问题