Skip to content
New issue

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

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

Already on GitHub? # to your account

[iOS] Fix scrollview over bounds of content size #23427

Closed

Conversation

zhongwuzw
Copy link
Contributor

@zhongwuzw zhongwuzw commented Feb 13, 2019

Summary

Fix scrollview offset out of content size in iOS, Android uses scrollTo and smoothScrollTo which not have this issue.

Fixes like #13594 #22768 #19970 .

Changelog

[iOS] [Fixed] - Fixed scrollView offset out of content size.

Test Plan

Assign scrollView a big offset which greater than content size plus content inset, we should keep offset in the area of content size plus content inset.

We can use reproduce example in #13594 or #22768 .

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 13, 2019
[iOS] Fix scrollview offset out of content size

Take contentInset into account
@zhongwuzw zhongwuzw force-pushed the fix_scrollview_overbounds branch from 0a799f7 to 53a5dc7 Compare February 13, 2019 13:41
@zhongwuzw zhongwuzw changed the title Fix scrollview overbounds [iOS] Fix scrollview over bounds of content size Feb 13, 2019
@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Feb 13, 2019
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Feb 21, 2019
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

@zhongwuzw merged commit 9c1c5a7 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Feb 21, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Feb 21, 2019
mbardauskas pushed a commit to mbardauskas/react-native that referenced this pull request Feb 21, 2019
Summary:
Fix scrollview `offset` out of content size in iOS, Android uses `scrollTo` and `smoothScrollTo` which not have this issue.

Fixes like facebook#13594 facebook#22768 facebook#19970 .

[iOS] [Fixed] - Fixed scrollView offset out of content size.
Pull Request resolved: facebook#23427

Differential Revision: D14162663

Pulled By: cpojer

fbshipit-source-id: a95371c8d703b6d5f604af0072f86c01c2018f4a
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 23, 2019
grabbou pushed a commit that referenced this pull request Mar 22, 2019
Summary:
Fix scrollview `offset` out of content size in iOS, Android uses `scrollTo` and `smoothScrollTo` which not have this issue.

Fixes like #13594 #22768 #19970 .

[iOS] [Fixed] - Fixed scrollView offset out of content size.
Pull Request resolved: #23427

Differential Revision: D14162663

Pulled By: cpojer

fbshipit-source-id: a95371c8d703b6d5f604af0072f86c01c2018f4a
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Component: ScrollView Merged This PR has been merged. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants