Skip to content

[ios] [screenOrientationPlugin] safe area insets not recalculated after lock orientation change #2566

Description

@GoethelHB

Bug Report

Plugin(s)

"@capacitor/screen-orientation": "^8.0.1",

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 8.4.2
  @capacitor/core: 8.4.2
  @capacitor/android: 8.4.2
  @capacitor/ios: 8.4.2

Installed Dependencies:

  @capacitor/cli: 8.4.1
  @capacitor/android: 8.4.1
  @capacitor/core: 8.4.1
  @capacitor/ios: 8.4.1

[success] iOS looking great! 👌

Platform(s)

iOS

Current Behavior

When you rotate programmatically via .lock() -> requestGeometryUpdate (the interface rotates but WebKit doesn't reliably re-evaluate the [env(safe-area-inset-*)] variables the way it does on a physical rotation — so a webview that was in landscape keeps stale insets after being forced to portrait.

Expected Behavior

After the geometry update completes, force WKWebView.safeAreaInsetsDidChange to fire to make WebKit recompute the CSS safe-area variables — replicating what a physical rotation does.

Code Reproduction

call:
await ScreenOrientation.lock({ orientation: "portrait" });

while being in landscape mode and you can see the issue.

Activity

  1. Ionitron commented on Sep 1, 2026

    @Ionitron
    Collaborator

    This issue needs more information before it can be addressed.
    In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
    If no sample app is provided within 7 days, the issue will be closed.

    Please see the Contributing Guide for how to create a Sample App.

    Thanks!
    Ionitron 💙

  2. Ionitron commented on Sep 9, 2026

    @Ionitron
    Collaborator

    It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

    Have a great day!
    Ionitron 💙

  3. ionitron-bot commented on Sep 24, 2026

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

  4. locked and limited conversation to collaborators on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions