Skip to content

[SectionList] scrollToLocation scrolls past content on iOS #18098

@JasperH8g

Description

@JasperH8g

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.2.1
Yarn: 0.27.5
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.2.0 => 16.2.0
react-native: ^0.53.3 => 0.53.3

Steps to Reproduce

Implement a SectionList and use scrollToLocation to scroll to the last section.

Expected Behavior

It scrolls to the last section, while making sure it doesn't scroll past the content. On Android this works as expected:

screen shot 2018-01-08 at 11 54 05

Actual Behavior

On iOS scrollToLocation scrolls to far:

img_362ddaf36c23-1

This also introduces some weird issues when the user starts scrolling from there on.

Reproducible Demo

https://snack.expo.io/HJgTyClEG

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions