Skip to content

[iOS, Fabric] measureInWindow stays off by the page sheet shrink offset after the sheet is dismissed #59169

Closed

Description

@Acetyld

Description

On iOS with Fabric, after a native page sheet (presentationStyle pageSheet) is presented and then dismissed, measureInWindow stays off by the shrink offset of the presenting screen. We measured 20 pt and 68 pt on an iPhone Air in portrait. The values are correct again after any layout of the root view, for example a rotation.

Our reading: UIKit applies a transform to the presenting screen while the sheet is up. The surface hosting view takes its window origin from its frame in the window during layout, including that transform. After dismissal the transform is removed but the hosting view is not laid out again, so the origin stays wrong.

Versions

React Native 0.88.0, Expo SDK 58.0.14, New Architecture (Fabric), iOS. react-native-screens 4.30.0 in the app.

Steps

  1. Render a View on a screen and call measureInWindow on it, and log the result.
  2. Present a Modal with presentationStyle pageSheet from that screen, then dismiss it.
  3. Call measureInWindow again on the same view. Expected: the same values as before. Observed: y is off by the shrink offset.
  4. Trigger a layout of the root view (for example rotate the device) and measure again. The values are correct.

Workaround

After a modal is dismissed, mark the root surface hosting view for layout again. We do this locally and the values are correct afterwards.

Related

#58981 (open) reports a centered formSheet on iPad where the window inset is missing from measureInWindow. This is a different case (page sheet on iPhone, transform not cleared). Not reduced to a standalone repository yet.

Activity

  1. react-native-bot commented on Oct 18, 2026

    @react-native-bot
    Collaborator

    Warning

    Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:


    You can read more about about it on our website: How to report a bug.

  2. Acetyld commented on Oct 18, 2026

    @Acetyld
    Author

    Re-filed on the bug report template with a public reproducer: #59171. Closing this one.

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

    Needs: AttentionIssues where the author has responded to feedback.Needs: ReproThis issue could be improved with a clear list of steps to reproduce the issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions