Web features explorer

Screen orientation lock

Limited availability

The screen.orientation.lock() method prevents changes to the screen orientation, typically in fullscreen applications such as games. For example, while locked, rotating a phone to the side won't change the screen orientation from landscape to portrait.

Browser support

  • Chrome Not supported
  • Chrome Android 38 Released on 2014-10-08
  • Edge Not supported
  • Firefox 144 Released on 2025-10-14
  • Firefox for Android 144 Released on 2025-10-14
  • Safari Not supported
  • Safari on iOS Not supported

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.

Developer use cases

  • Lock the screen orientation to rotate only specific UI components dynamically, rather than letting the native OS rotate the entire application viewport. Lock the screen orientation to rotate only specific UI components dynamically, rather than letting the native OS rotate the entire application viewport. [see original comment]