How to Stop Rotation to Landscape?

Wondering if there’s code or something we can add to STOP our web-app rotating when user rotates phone to landscape… will be easier right now for our design to only allow portrait and fix the portrait view in place. All tips welcome :wink:


If i’m not mistaken, I think the browser controls that, not the web page, and I think the browser listens to the user’s device preferences. I don’t believe there’s a way to control it from the web app itself. Then again, that answer is based on about 7 minutes of Googling and Stack Overflowing, so it might be possible, but not common knowledge.

The other thing worth keeping in mind is that if the user is expecting it to rotate, and it doesn’t, you’ve created a point of friction where they think something is bugged, when in reality you put effort into making it work that way. It’s not usually a good idea to build counter to user expectations. If I rotate my device, I expect the screen to adjust.

is there anything new on this? When using floating navigation groups attached to the bottom of the page, the groups migrate up when the keyboard is opened in chrome. I would like to attach the floating groups to the top to avoid this issue (e.g., have the keyboard pop up over the navigation group), but then if the user goes to landscape the navigation group would disappear because it is below the length of the page and therefore the user can no longer navigate the page.