react-native: Content inside scroll view with contentInsetAdjustmentBehavior with incorrect height

🐛 Bug Report

It seems that scroll view doesn’t calculate properly the size of its container when contentInsetAdjustmentBehavior is set to automatic

To Reproduce

Refer to this snack: https://snack.expo.io/r1XhuwVBV

When contentInsetAdjustmentBehavior is set to automatic, the container view get’s pushed from the top, but the container maintains the same height, so you have an extra scroll size that hides the bottom text.

screen shot 2019-02-15 at 17 26 01

For reference, same code with contentInsetAdjustmentBehavior set to never:

screen shot 2019-02-15 at 17 25 47

Expected Behavior

Content should just take the remaining space.

screen shot 2019-02-15 at 17 45 06

Code Example

https://snack.expo.io/r1XhuwVBV

Environment

React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
      Memory: 2.82 GB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.13.0 - /usr/local/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 27, 28
        Build Tools: 27.0.3, 28.0.3
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5014246
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.3 => 16.6.3 
      react-native: 0.58.4 => 0.58.4 
    npmGlobalPackages:
      react-native-cli: 2.0.1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 22 (1 by maintainers)

Most upvoted comments

Btw, this also happens when contentInsetAdjustmentBehavior is always.

@1987cr cómo está lo más bonito de Sant Cugat?

This is so annoying 😦