From c3d381265fe2b1b34169f1daee3b4291036b2100 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Thu, 15 Oct 2026 11:25:19 -0700 Subject: [PATCH] fix(macos): add no-op scroll indicator inset setters to RCTScrollView RCTScrollViewManager exports scrollIndicatorInsets, verticalScrollIndicatorInsets and automaticallyAdjustsScrollIndicatorInsets on every platform, but on macOS RCTScrollView has no setters for them, so setting one from JavaScript crashed. Add no-op setters on macOS. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 33ac4470-c1d2-43c0-92ee-8407909f0f6a --- .../React/Views/ScrollView/RCTScrollView.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/react-native/React/Views/ScrollView/RCTScrollView.m b/packages/react-native/React/Views/ScrollView/RCTScrollView.m index f0d0214e7244..9a874e7f415f 100644 --- a/packages/react-native/React/Views/ScrollView/RCTScrollView.m +++ b/packages/react-native/React/Views/ScrollView/RCTScrollView.m @@ -1508,6 +1508,18 @@ - (void)setContentInsetAdjustmentBehavior:(UIScrollViewContentInsetAdjustmentBeh _scrollView.contentInsetAdjustmentBehavior = behavior; _scrollView.contentOffset = contentOffset; } +#else // [macOS] No-op setters, so setting these props from JS doesn't crash +- (void)setScrollIndicatorInsets:(__unused UIEdgeInsets)value +{ +} + +- (void)setVerticalScrollIndicatorInsets:(__unused UIEdgeInsets)value +{ +} + +- (void)setAutomaticallyAdjustsScrollIndicatorInsets:(__unused BOOL)automaticallyAdjusts +{ +} #endif // [macOS] #pragma clang diagnostic pop // [macOS]