From 818fb8d683287fc70ec0e63d4e29b0e810d9611c Mon Sep 17 00:00:00 2001 From: Kelvin Amoaba <97001695+AmoabaKelvin@users.noreply.github.com> Date: Thu, 5 Nov 2026 19:35:07 +0000 Subject: [PATCH] fix(mobile): keep iPad page headers clear of the window controls (#38635) * fix(mobile): keep iPad page headers clear of the window controls The reserved-regions probe reported the window's plain safe area, which on iPadOS 26+ windowed mode does not cover the window controls. On iOS 27.1+ pages take their top inset from that value, so the host header sat under the controls while native screens, which get the corner-adapted inset, cleared them. * fix(mobile): only raise the page's top inset for window controls --- .../ios/OrcaReservedRegionsModule.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mobile/modules/orca-reserved-regions/ios/OrcaReservedRegionsModule.swift b/mobile/modules/orca-reserved-regions/ios/OrcaReservedRegionsModule.swift index 6093a967b75..00e3ac34d24 100644 --- a/mobile/modules/orca-reserved-regions/ios/OrcaReservedRegionsModule.swift +++ b/mobile/modules/orca-reserved-regions/ios/OrcaReservedRegionsModule.swift @@ -103,12 +103,16 @@ public class OrcaReservedRegionsModule: Module { .intersection(window.bounds) keyboardInset = overlap.isNull ? 0 : overlap.height } + // Same top as the root's (OrcaWindowControlsInset), so pages clear iPad window controls too. + var safeAreaInsets = window.safeAreaInsets + safeAreaInsets.top = max( + safeAreaInsets.top, window.edgeInsets(for: .safeArea(cornerAdaptation: .vertical)).top) let snapshot = ReservedRegionsSnapshot( divisions: window.reservedRegions(kind: .division).map(\.frame), hasFoldDivision: !window.reservedRegions(kind: .division, options: .includeInactive).isEmpty, occlusions: window.reservedRegions(kind: .occlusion).map(\.frame), windowBounds: window.bounds, - windowSafeAreaInsets: window.safeAreaInsets, + windowSafeAreaInsets: safeAreaInsets, keyboardInset: keyboardInset ) // The first layout always reports, so a listener starts from the real state.