fix: adjust content inset behavior for macOS#2806
Merged
Saadnajmi merged 4 commits intomicrosoft:mainfrom Mar 25, 2026
Merged
Conversation
Fix content inset adjustments for macOS ScrollView.
Collaborator
|
Mind showing a before / after? Ive never been quite sure what this prop does on Mac so I'd appreciate :) |
Saadnajmi
reviewed
Mar 23, 2026
packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm
Outdated
Show resolved
Hide resolved
|
Saadnajmi
reviewed
Mar 23, 2026
packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm
Outdated
Show resolved
Hide resolved
Saadnajmi
approved these changes
Mar 25, 2026
Saadnajmi
added a commit
to Saadnajmi/react-native-macos
that referenced
this pull request
Mar 27, 2026
Fix content inset adjustments for macOS ScrollView. <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The four fields below are mandatory. --> <!-- This fork of react-native provides React Native for macOS for the community. It also contains some changes that are required for usage internal to Microsoft. We are working on reducing the diff between Facebook's public version of react-native and our microsoft/react-native-macos fork. Long term, we want this fork to only contain macOS concerns and have the other iOS and Android concerns contributed upstream. If you are making a new change then one of the following should be done: - Consider if it is possible to achieve the desired behavior without making a change to microsoft/react-native-macos. Often a change can be made in a layer above in facebook/react-native instead. - Create a corresponding PR against [facebook/react-native](https://github.com/facebook/react-native) **Note:** Ideally you would wait for Facebook feedback before submitting to Microsoft, since we want to ensure that this fork doesn't deviate from upstream. --> ## Summary: <!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? --> ## Test Plan: <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. --> --------- Co-authored-by: Saad Najmi <sanajmi@microsoft.com>
Saadnajmi
added a commit
that referenced
this pull request
Mar 28, 2026
…selection, CVEs) (#2876) ## Summary Backport of 10 commits from `main` to `0.81-stable`: - **fix(spm):** fix pre-existing macOS porting bugs (#2869) - **fix(transforms):** enable transforms on new arch and fix hit testing on both arches (#2866) - **chore(deps-dev):** bump undici from 5.29.0 to 6.24.0 (#2871) - **fix(fabric):** colors not respecting dark mode appearance, implement platform color (#2867) - **fix:** adjust content inset behavior for macOS (#2806) - **fix:** reduce dependency CVE overrides and refresh vulnerable transitive deps (#2874) - **feat(fabric, text):** support native text selection when selectable={true} (#2864) - **fix:** macOS ScrollView resize and content inset behavior (#2732) - **docs:** add backporting guide and automation (#2863) - **fix(fabric, textinput):** support `enableFocusRing` ### Conflict resolutions - `RCTUIView.h/m` → On 0.81-stable, `RCTUIView` lives in `React/Base/RCTUIKit.h` and `React/Base/macOS/RCTUIKit.m` (the RCTUIKit module refactor hasn't landed on 0.81). Transform changes were manually applied to these files. - `RCTUIKitCompat.h/m` → `NSColor (RCTAppearanceResolving)` category was added to `RCTUIKit.h/m` instead. - Lockfile conflicts resolved by accepting incoming CVE fixes. ## Test Plan - Same as the original PRs - Verify transforms render correctly on macOS (old + new arch) - Verify dark mode color resolution works in Fabric - Verify ScrollView resize and content inset behavior - Verify text selection with selectable={true} - Verify enableFocusRing on TextInput in Fabric 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: eadron <eadron@users.noreply.github.com> Co-authored-by: Kyle Essenmacher <15271436+kessenma@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix content inset adjustments for macOS ScrollView.
Summary:
Test Plan: