Skip to content

ScreenOrientation: lock() method #738

Closed

Description

@shalanah

Description

Video, interactive, and gaming mobile sites are often optimized for vertical or horizontal viewing. Orientation lock is important to give the user the best experience, avoid wasting development time, and to avoid bad app state by accidental rotations.

Missing from iOS/iPadOS. Good support on Android (2013-2015 implemented approximately 10 years ago) with the exception of Firefox for Android.

Missing from Desktop devices (understandably), would be best if also available on tablet touch devices.

Screenshot 2024-09-20 at 10 56 32 AM

MDN Screen Orientation Lock

Related Fullscreen API: #732

Web Apps

With the advent of PWAs a future discussion point could be removing the fullscreen prerequisite.

Specification

https://w3c.github.io/screen-orientation/#dom-screenorientation-lock

Additional Signals

https://stackoverflow.com/questions/5298467/prevent-orientation-change-in-ios-safari

Activity

  1. AshleyScirra commented on Oct 7, 2024

    @AshleyScirra

    This is also useful for web games made in Construct so we support this.

  2. wpt-interop commented on Feb 13, 2025

    @wpt-interop
    Collaborator

    Thank you for proposing ScreenOrientation: lock() method for inclusion in Interop 2025.

    We wanted to let you know that this proposal was not selected to be part of Interop this year.

    On behalf of the entire Interop team, thank you for submitting this proposal for consideration. We got many more proposals than we could include in this year's project, necessitating some difficult choices. Please note this should not be taken as a comment on the technology as a whole, or our willingness to consider it for Interop in the future. We appreciate the work you put into your proposal, and would welcome your participation in future rounds of Interop.

    For an overview of our process, see proposal selection. Thank you again for contributing to Interop 2025.

    Posted on behalf of the Interop team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    focus-area-proposal

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions