mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 22:50:10 +08:00
Fixes SafeAreaView when set emulateUnlessSupported on safeArea supported devices (#24615)
Summary: On safeArea supported devices like `iPhoneX`, we need to forbid invalidate `safeAreaInsets` when set `emulateUnlessSupported` prop, otherwise `SafeAreaView` would broken. cc. cpojer shergin . Before:  After:  [iOS] [Fixed] - Fixes SafeAreaView when set emulateUnlessSupported on safeArea supported devices Pull Request resolved: https://github.com/facebook/react-native/pull/24615 Differential Revision: D15122211 Pulled By: cpojer fbshipit-source-id: 8a1c3f2aedbde707d8d6c8f36c97e6424585dc59
This commit is contained in:
committed by
Facebook Github Bot
parent
6f6696fa63
commit
f75d47c915
@@ -118,6 +118,10 @@ static BOOL UIEdgeInsetsEqualToEdgeInsetsWithThreshold(UIEdgeInsets insets1, UIE
|
||||
}
|
||||
|
||||
_emulateUnlessSupported = emulateUnlessSupported;
|
||||
|
||||
if ([self isSupportedByOS]) {
|
||||
return;
|
||||
}
|
||||
|
||||
[self invalidateSafeAreaInsets];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user