When touching a View that is inside a ScrollView the pointer propagates and makes the canvas react as well. (facebook/react-native#1046)
The current workaround is to disable the ScrollView (changing scrollEnabled
to false
) on children's onPanResponderGrant
and then enabling it again onPanResponderRelease
. (08/04/2016)
This solution will fix that issue if disabling the ScrollView is not an option to you.
Do an npm i react-native-scroll-block
and then try out this simple example :)
BlockView will block every interaction performed inside it, and will not propagate the pointer to it's parent.
Wrap any View with a BlockView to ensure that the input won't go to the ScrollView.
blocked
Boolean
Whether the view should blocked the input.
Default: true
Written by Maria Julia Racca and Martin Giachetti.
Released under the MIT License: www.opensource.org/licenses/mit-license.php