From 86df742e73ecacbf29921ab6f74333c36a7dca26 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Tue, 12 Dec 2023 06:49:18 -0800 Subject: [PATCH] Fixes ScrollView contentInsetAdjustmentBehavior assignment (#41879) Summary: Fixes ScrollView contentInsetAdjustmentBehavior wrong assignment ## Changelog: [IOS] [FIXED] - Fixes ScrollView contentInsetAdjustmentBehavior assignment Pull Request resolved: https://github.com/facebook/react-native/pull/41879 Test Plan: None. Reviewed By: cortinico Differential Revision: D52031541 Pulled By: NickGerleman fbshipit-source-id: 283e260fa40d2eff0202b5f8140b1c087d3124d5 --- .../ComponentViews/ScrollView/RCTScrollViewComponentView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm index 41e5ebc3cf1a35..5192358f6616a7 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm @@ -284,7 +284,7 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & } else if (contentInsetAdjustmentBehavior == ContentInsetAdjustmentBehavior::Automatic) { scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAutomatic; } else if (contentInsetAdjustmentBehavior == ContentInsetAdjustmentBehavior::ScrollableAxes) { - scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAutomatic; + scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentScrollableAxes; } else if (contentInsetAdjustmentBehavior == ContentInsetAdjustmentBehavior::Always) { scrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways; }