You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fabric's RNCSafeAreaViewComponentView falls back to _providerView = self when it cannot find a provider, but it does not override safeAreaInsetsDidChange. Provider notifications cannot update that fallback, so UIKit inset changes after mounting are not applied. The fallback path exists in both 5.9.1 and current main.
Our local workaround overrides safeAreaInsetsDidChange, calls super, and calls updateStateIfNecessary only when _providerView == self.
Steps to reproduce
Build this component on iOS with Fabric and safe-area-context 5.9.1:
import{useState}from'react';import{Button,Modal,Text}from'react-native';import{SafeAreaProvider,SafeAreaView}from'react-native-safe-area-context';exportdefaultfunctionApp(){const[open,setOpen]=useState(false);return<SafeAreaProvider><Buttontitle="Open"onPress={()=>setOpen(true)}/><Modalvisible={open}presentationStyle="pageSheet"><SafeAreaViewstyle={{flex: 1}}><Text>Inspect the safe-area padding after rotating or resizing the sheet.</Text><Buttontitle="Close"onPress={()=>setOpen(false)}/></SafeAreaView></Modal></SafeAreaProvider>;}
Open the native modal and rotate or resize it so its safe-area insets change.
Set a breakpoint in updateStateIfNecessary: the self-provider fallback lacks a callback for these UIKit changes.
This snippet is an extracted reproduction recipe, not a new simulator run. The report is based on inspecting the fallback implementation and our integration patch. Adding a SafeAreaProvider inside the Modal is the documented workaround; this report asks whether the existing self-provider fallback should also keep updating, or whether it is intentionally unsupported.
I ran into this with a react-native-screens formSheet. After a rotation the insets stay stale until the next React commit. There's a repro at https://github.com/hirbod/rnsac-rotation-repro and #803 fixes it with the safeAreaInsetsDidChange override you suggested.
Activity
hirbod commentedon Nov 2, 2026
I ran into this with a react-native-screens
formSheet. After a rotation the insets stay stale until the next React commit. There's a repro at https://github.com/hirbod/rnsac-rotation-repro and #803 fixes it with thesafeAreaInsetsDidChangeoverride you suggested.