Skip to content

fix(ios): default contentInsetAdjustmentBehavior to scrollableAxes on iOS 26+#57300

Open
IsaacIsrael wants to merge 1 commit into
react:mainfrom
IsaacIsrael:fix/ios26-scroll-view-content-inset-liquid-glass
Open

fix(ios): default contentInsetAdjustmentBehavior to scrollableAxes on iOS 26+#57300
IsaacIsrael wants to merge 1 commit into
react:mainfrom
IsaacIsrael:fix/ios26-scroll-view-content-inset-liquid-glass

Conversation

@IsaacIsrael

@IsaacIsrael IsaacIsrael commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

On iOS 26+, Apple introduced the liquid glass design language with translucent system chrome (tab bars, toolbars, navigation bars). For scroll views to properly adjust their content to account for this translucent chrome, contentInsetAdjustmentBehavior should default to UIScrollViewContentInsetAdjustmentScrollableAxes instead of UIScrollViewContentInsetAdjustmentNever.

This PR upgrades the default on iOS 26+ when UIDesignRequiresCompatibility is not YES in Info.plist, in three places:

  • RCTEnhancedScrollView.mm initWithFrame: — defaults to scrollableAxes instead of never
  • RCTScrollViewComponentView.mm updateProps: — upgrades incoming JS default never to scrollableAxes
  • RCTScrollViewComponentView.mm prepareForRecycle — resets to scrollableAxes instead of never

Behavior Matrix

iOS Version UIDesignRequiresCompatibility Default Behavior
< 26 any never (unchanged)
26+ YES never (unchanged)
26+ NO or absent scrollableAxes (new)

Apps that explicitly set contentInsetAdjustmentBehavior to "automatic", "always", or "scrollableAxes" from JS are unaffected.

Changelog:

[IOS] [FIXED] - Default contentInsetAdjustmentBehavior to scrollableAxes on iOS 26+ for liquid glass translucent chrome support

Test Plan:

  1. Create a React Native app targeting iOS 26 simulator
  2. Remove UIDesignRequiresCompatibility from Info.plist (or set to NO)
  3. Add a FlatList inside a screen with a translucent bottom tab bar (drawBehind: true)
  4. Before this PR: last items hidden behind the tab bar with no automatic inset
  5. After this PR: scroll view automatically adjusts content inset for the translucent tab bar
  6. Verify iOS 15–18 behavior is unchanged (never default)
  7. Verify UIDesignRequiresCompatibility = YES keeps never default on iOS 26+

Fixes #57299

… iOS 26+

On iOS 26+, Apple introduced the liquid glass design language with
translucent system chrome (tab bars, toolbars). Scroll views need
contentInsetAdjustmentBehavior set to scrollableAxes to automatically
adjust content insets for this translucent chrome.

This change upgrades the default from "never" to "scrollableAxes" on
iOS 26+ when UIDesignRequiresCompatibility is not YES, affecting:

- RCTEnhancedScrollView initWithFrame:
- RCTScrollViewComponentView updateProps: (upgrades JS default "never")
- RCTScrollViewComponentView prepareForRecycle

Apps that explicitly set contentInsetAdjustmentBehavior to "automatic",
"always", or "scrollableAxes" from JS are unaffected. Apps with
UIDesignRequiresCompatibility=YES retain the current "never" default.

Fixes react#57299

Co-authored-by: Cursor <cursoragent@cursor.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 21, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jun 21, 2026
auto contentInsetAdjustmentBehavior = newScrollViewProps.contentInsetAdjustmentBehavior;
if (@available(iOS 26, *)) {
NSNumber *compat = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UIDesignRequiresCompatibility"];
if (!compat.boolValue && contentInsetAdjustmentBehavior == ContentInsetAdjustmentBehavior::Never) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On iOS 26 without UIDesignRequiresCompatibility, this upgrades Never to ScrollableAxes whenever the value is Never. The prop arrives as Never both for the RN default and when a developer explicitly sets contentInsetAdjustmentBehavior="never", so this overrides an explicit "never" too.

The effect is that there is no per-view way to keep never on iOS 26 now, just the app-wide UIDesignRequiresCompatibility opt-out.

Is overriding an explicit "never" intended? If someone wants no inset adjustment on a specific scroll view on iOS 26, how would they express it? The prop does not seem to carry whether the value was explicit, so maybe there is no clean per-view fix. Wanted to check the intent.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iOS 26: default contentInsetAdjustmentBehavior should be scrollableAxes for liquid glass

2 participants