Skip to content

ScrollView contentInset always overrides scrollIndicatorInsets #31207

@samjusaitis

Description

@samjusaitis

Description

When contentInset and scrollIndicatorInsets are both set to different values on a ScrollView, it seems the value of contentInset always overrides scrollIndicatorInsets.

This has already been reported here #13025, and potentially fixed, then regressed.

React Native version:

System:
    OS: macOS 11.2.3
    CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
    Memory: 36.92 GB / 72.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.9.0 - /usr/local/bin/node
    Yarn: 1.22.5 - /usr/local/bin/yarn
    npm: 6.14.11 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6626763
    Xcode: 12.4/12D4e - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Create a ScrollView
  2. Set the contentInset to { top: 150 }, contentOffset to { y: -150 }, and scrollIndicatorInsets to { top: 25 }.
  3. The scrollIndicatorInsets have no effect, and just mimics the contentInset

Expected Results

The scrollIndicatorInsets should operate unique from the contentInset. In the example above (and below Snack), setting the scrollIndicatorInsets.top to 25 should make the scroll indicator start from 25pt from the top of the screen, rather than down near where the content has been inset to.

Snack, code example, screenshot, or link to a repository:

https://snack.expo.io/@sjusaitis/scrollview-scrollindicatorinsets-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Triage 🔍StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions