Skip to content

ScrollView contentContainerStyle's flexGrow doesn't account for contentInsetAdjustmentBehavior or automaticallyAdjustKeyboardInsets #46722

@SimpleCreations

Description

@SimpleCreations

Description

This is a reopen of #25282 which is still reproducible in the latest React native version.

Steps to reproduce

  1. Create a ScrollView with contentInsetAdjustmentBehavior="automatic" and contentContainerStyle={{flexGrow: 1}}.
  2. Observe that the content container grows larger than the ScrollView's height, while the height is expected to match, because safe area insets would be accounted for.

See the Expo snack

React Native Version

0.75.3

Affected Platforms

Runtime - iOS

Output of npx react-native info

N/A — easy to reproduce

Stacktrace or Logs

N/A

Reproducer

https://snack.expo.dev/@louay/scrollview-layout-contentinset-issue

Screenshots and Videos

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions