react-native: [ScrollView] Warning: ScrollView doesn't take rejection well - scrolls anyway
I put a ScrollView inside another ScrollView.
When I scrolled,It will give a warning: Warning: ScrollView doesn't take rejection well - scrolls anyway
,and sometimes the ScrollView inside will jump to the top or bottom.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 43
- Comments: 97 (20 by maintainers)
Commits related to this issue
- [ReactNative] Block native from becoming js responder — committed to facebook/react-native by andreicoman11 9 years ago
- Remove confusing warning from ScrollResponder Summary:I get this warning in cases when nothing went wrong. Not sure what I can do about the warning. I placed a few sliders in a ScrollView and everyt... — committed to facebook/react-native by deleted user 8 years ago
- Remove confusing warning from ScrollResponder Summary:I get this warning in cases when nothing went wrong. Not sure what I can do about the warning. I placed a few sliders in a ScrollView and everyt... — committed to facebook/react-native by deleted user 8 years ago
- Remove confusing warning from ScrollResponder Summary:I get this warning in cases when nothing went wrong. Not sure what I can do about the warning. I placed a few sliders in a ScrollView and everyt... — committed to nightingale/react-native by deleted user 8 years ago
hey. Please stop commenting “+1”.
github have a 👍 feature now, just upvote the first issue message. that way, issues can be sorted by 👍
and if you just want to receive notifications of this issue, there is a Subscribe button on the right too
Thanks
Do you think it’s wise to do this to scrollview? People won’t understand.
…poor poor scrollview
@gre +1
I tried many methods to have nested ScrollView and avoid warning message but I just can’t seems to find a correct way. So, until there is one, I just decided to comment out where the warning message gets called in node_modules/react-native/Libraries/Components/ScrollResponder.js (v 0.17.0) line 203.
+1 and it’s not just the warning. If you have a form rendered in a ScrollView, then when you try to move from one TextInput to the next by tapping, the warning fires, and the next field doesn’t get focus. You have to tap twice. It makes forms very annoying to use.
I get this issue with a
<ListView>
inside a<ScrollView>
Hey guys, I’ve just removed the warning 😃 Context: https://github.com/facebook/react-native/commit/5f77f15bac82c7a13605fdbd1ee7e2823c1821bf
Lots of people report something similar to this:
I completely agree and don’t think the warning is very useful. I’m closing this issue (the warning won’t show up anymore in 0.24 and above).
Regarding the second part of the issue description:
Please report that separately (with a video!) and ideally send a pull request with a fix.
I get this warning randomly even without nested ScrollViews. No clue what it means.
@mkonicek Thanks, but did your commit get merged? I’m still getting the warning in 0.24
dont think we need any more +1s
@brentvatne I was hit by this today. This happens when you have a parent ScrollView and TextInput inside scrollview.
When you try to scroll using the TextInput area, TextInput will
rejectResponderTermination
(https://github.com/facebook/react-native/blob/master/Libraries/Components/TextInput/TextInput.js#L469). This will trigger the ScrollView warning.Setting
rejectResponderTermination
to false removes the warning for me. Not sure about the side effects of this.I get this “ScrolView doesn’t take rejection well”
if I have TextInput inside ScrollView with just Text it works
so, this is no warning
<View> <Text>Test</Text> </View>
this is with warning
<View> <TextInput style={{height: 40, borderColor: 'gray', borderWidth: 1}} onChangeText={(text) => this.setState({text})} value={this.state.text} /> </View>
one more here. I have two ListViews inside a Scroll (I’m using
react-native-scrollable-tab-view
component)Is it a vertical + horizontal combination or two ScrollViews scrolling on the same axis?