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
Maybe in a new future...
As for May 2015,
there is an experimental functionality that does that. But it only works on Firefox 18+, IE11+, and Chrome 38+.
However, it does not work on Opera or Safari yet.
https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation#Browser_compatibility
Here is the current code for the compatible browsers:
var lockOrientation = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation;
lockOrientation("landscape-primary");