Closed
Description
Hi! in RN 0.48.1 doesn`t work contentOffset when component is initialized.
Here is example for reproduction https://github.com/vivalaakam/rn_issue
In this example after initialize i will be see second screen, named 'Welcome to screen #2'
In version 0.47.2 it work as well
react-native -v
react-native-cli: 2.0.1
react-native: 0.48.1
node -v
v8.4.0
npm -v
5.4.0
yarn --version
0.27.5
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
stage88 commentedon Sep 5, 2017
This is probably related to 1d22f8f, the scenario the commit addresses doesn't apply to me so i have replaced line 319 in node_modules/react-native/React/Views/RCTScrollView.m with
That fixes my negative offset with refresh control problem, it will have to do until the issue is fixed.
ScrollView: Smart `contentOffset` preserving
shergin commentedon Sep 5, 2017
Well, the problem with this issue is that
contentOffset
prop should not exist in the first place. (And it does not exist on Android.)Could we use
scrollTo
method instead?janicduplessis commentedon Sep 5, 2017
@shergin I think we should try landing #15670 to fix that regression
krizpoon commentedon Sep 15, 2017
I have similar problem and solved it with:
pull-bot commentedon Oct 10, 2017
@facebook-github-bot no-template
facebook-github-bot commentedon Oct 10, 2017
Hey, thanks for reporting this issue! It looks like your description is missing some necessary information, or the list of reproduction steps is not complete. Can you please add all the details specified in the Issue Template? This is necessary for people to be able to understand and reproduce the issue being reported. I am going to close this, but feel free to open a new issue with the additional information provided. Thanks! See "What to Expect from Maintainers" to learn more.
henrikra commentedon Oct 27, 2017
@shergin Could you explain more why
contentOffset
prop should not exists? For example now on Android I have to do weird hacks to init scroll view's position to something that I want.6 remaining items