Skip to content

fix(macos): add no-op scroll indicator inset setters to RCTScrollView - #3130

Draft
Saad Najmi (Saadnajmi) wants to merge 1 commit into
microsoft:mainfrom
Saadnajmi:fix-macos-scroll-indicator-insets
Draft

Saad Najmi (Saadnajmi) wants to merge 1 commit into
microsoft:mainfrom
Saadnajmi:fix-macos-scroll-indicator-insets

Conversation

@Saadnajmi

Copy link
Copy Markdown
Collaborator

Summary:

RCTScrollViewManager exports scrollIndicatorInsets, verticalScrollIndicatorInsets, and automaticallyAdjustsScrollIndicatorInsets on every platform, but on macOS RCTScrollView has no setters for them. Setting one from JavaScript crashed: RCTComponentData gets a nil method signature for the two UIEdgeInsets setters, and sends an unrecognized selector for the BOOL one.

This adds no-op setters for all three on macOS.

Office shipped the first two in its copy of React Native macOS 0.81. automaticallyAdjustsScrollIndicatorInsets has the same problem, so this covers it too.

Test Plan:

Built the same change on 0.81 in Office for macOS arm64 and x86_64, with warnings as errors. CI covers main.

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant