Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SectionList] scrollToLocation scrolls past content on iOS #18098

Closed
Jpunt opened this issue Feb 26, 2018 · 6 comments
Closed

[SectionList] scrollToLocation scrolls past content on iOS #18098

Jpunt opened this issue Feb 26, 2018 · 6 comments
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Jpunt
Copy link

Jpunt commented Feb 26, 2018

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

@stale
Copy link

stale bot commented Jun 27, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 27, 2018
@Jpunt
Copy link
Author

Jpunt commented Jul 10, 2018

This issue is still relevant to RN 0.55.4

https://snack.expo.io/@jpunt/scrolltolocation

Environment:
  OS: macOS High Sierra 10.13.5
  Node: 8.2.1
  Yarn: 1.5.1
  npm: 5.3.0
  Watchman: 4.9.0
  Xcode: Xcode 9.4.1 Build version 9F2000
  Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz => 0.55.4

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 10, 2018
@DannyvanderJagt
Copy link
Contributor

Got the same issue on IOS. After fiddling around I found a temporary solution for my app:

this.sectionListRef.scrollToLocation({
	itemIndex: -1 , // IOS only
	sectionIndex: index,
})

After this the scrollToLocation works as expected.
Let me know if this works for others too

@stale
Copy link

stale bot commented Dec 16, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Dec 16, 2018
@stale
Copy link

stale bot commented Dec 24, 2018

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Dec 24, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Dec 24, 2018
facebook-github-bot pushed a commit that referenced this issue Jan 22, 2019
Summary:
Fixes #18098
Pull Request resolved: #21577

Differential Revision: D13761884

Pulled By: cpojer

fbshipit-source-id: a096d69c589815d00754427fb575de0d8d0b595f
facebook-github-bot pushed a commit that referenced this issue Jan 28, 2019
Summary:
Changelog:
----------
[iOS][fixed] Fixed overscroll behavior on iOS virtualized lists (Fixes #18098)
Pull Request resolved: #23181

Differential Revision: D13838579

Pulled By: cpojer

fbshipit-source-id: 2ec5787218ecca0e01aaf31bfbb7d630cf9f1f09
@cpojer
Copy link
Contributor

cpojer commented Jan 29, 2019

You should be able to use overScrollMode="never" to fix your issue.

matt-oakes pushed a commit to matt-oakes/react-native that referenced this issue Feb 7, 2019
Summary:
Fixes facebook#18098
Pull Request resolved: facebook#21577

Differential Revision: D13761884

Pulled By: cpojer

fbshipit-source-id: a096d69c589815d00754427fb575de0d8d0b595f
matt-oakes pushed a commit to matt-oakes/react-native that referenced this issue Feb 7, 2019
Summary:
Changelog:
----------
[iOS][fixed] Fixed overscroll behavior on iOS virtualized lists (Fixes facebook#18098)
Pull Request resolved: facebook#23181

Differential Revision: D13838579

Pulled By: cpojer

fbshipit-source-id: 2ec5787218ecca0e01aaf31bfbb7d630cf9f1f09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
5 participants