-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
FlatList onScroll corner case bug: contentOffset undefined #15725
Comments
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 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 that meets the requirements set forth in the template. Thanks! |
What other information would you like? It's a bug, and I've read the contribution guidelines. There isn't a Snack that reproduces it in the debugger. A fix would be to add a guard that ensures the |
Our bot is pretty simplistic at the moment, and it did not see the first few lines from the template here, hence why it deemed this issue as not following the template. I did look at the issue and there doesn't seem to be a repro here that we can use to follow up, however. If you think such a guard would help, could you send a PR? |
Created PR #16275 The safeguard check is done on the JS side. There may be a more comprehensive solution on the Event itself (native side? not sure). |
Environment
react-native -v
: 0.45.1node -v
: 7.0npm -v
: 3.10Target Platform: iOS 10.2
Development Operating System: OSX 10.12
Build tools: react-native & Xcode
Steps to Reproduce
This is a corner case bug that happens sporadically in a production build. It hasn't happened yet in a debug build. In the
onScroll
callback forFlatList
, the argument passed in is incomplete.event.nativeEvent.contentOffset
is undefined. The crash report came from NewRelic:There is only one line in our app that references a
.y
key:FlatList is instantiated as:
Expected Behavior
contentOffset should be a valid object.
Actual Behavior
contentOffset is undefined. Is it possible for contentOffset to be undefined in the event parameter?
Reproducible Demo
Won't reproduce in a debugger.
The text was updated successfully, but these errors were encountered: