react-native-directed-scrollview icon indicating copy to clipboard operation
react-native-directed-scrollview copied to clipboard

Content size not responding to changes in contentContainerSize on iOS with RN 52.2

Open MichaelDanielTom opened this issue 6 years ago • 6 comments

Hey guys, Whenever contentContainerSize changes, the native scrollview's content size stays the same. I think it might have to do with this commit which fixed some bugs, but may have introduced others.

Additionally, when the ScrollView is first mounted, the content seems to be placed correctly, but quickly animates out of the field of view.

Thanks for any help, and great library!

MichaelDanielTom avatar Mar 02 '18 00:03 MichaelDanielTom

Same issue here with [email protected]

alexlevy0 avatar Mar 12 '18 18:03 alexlevy0

@chrisfisher I'm trying to fix this right now, and I was wondering how/why this commit fixed the previous scrolling bug introduced in 0.52. Thanks for any help!

MichaelDanielTom avatar Mar 16 '18 19:03 MichaelDanielTom

@MichaelDanielTom I thought it was due to the update of native React and specially to UIManager class

alexlevy0 avatar Mar 16 '18 19:03 alexlevy0

@alexlevy0 Also, which specific problems are you having? Just the contentsize change not being propgated, or jerky movement on mount, or both?

MichaelDanielTom avatar Mar 16 '18 20:03 MichaelDanielTom

Ok guys, I just made a small fix that should resolve most bugs - I'm not sure what the behavior is on Android yet, nor if this works in all situations on iOS (like with different min/max zoomScales). I also used an api that is kinda marked as internal from RCTScrollView, so I'm not going to make a pr yet with it.

I'll clean it up sometime in the next week and make a proper pr, but hopefully this will help if anyone's looking for a quick fix!

MichaelDanielTom avatar Mar 16 '18 23:03 MichaelDanielTom

@MichaelDanielTom this commit is a hack which makes the component respond to interactions from RN 0.52 and above. I haven't had time to dig around for a proper fix. Happy to look at merging anything you can come up with.

chrisfisher avatar Mar 25 '18 06:03 chrisfisher