question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ScrollView inside swipeable modal is not working

See original GitHub issue

Just recently did an update and have confirmed that v7 stops the ability to scroll inside the modal whereas v6 was still working (swapped between the versions)

I looked at the diff from 6.5.0 up to 7.0.2 and the only thing I can see that may effect the scroll view would be this line.

I’ve tried adding the Touchable... around the views as other closed issues have suggested to no luck.

I’ve been stumped on this for a couple days now and not sure what could be wrong.

The modal is something of this structure:

<Modal>
    <ScrollView horiztonal>
        <FlatList ... />
       ...
    </ScrollView>
</Modal>

Any idea what changes from v6.5.0 to v7.0.2 could be causing the scrolling to not work?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:46
  • Comments:87 (18 by maintainers)

github_iconTop GitHub Comments

153reactions
estebanminocommented, Mar 11, 2019

I’ve been facing this issue as well. Tried your solution @rewieer but it didn’t work for me. Found a workaround for now. Hope it helps. <Modal> <ScrollView> <TouchableOpacity> ... </TouchableOpacity> </ScrollView> <Modal>

79reactions
Mukhammadalicommented, Mar 11, 2020

You can do this if you would like to use View instead of TouchableWithoutFeedback

NOTE: If you are not using swipeDirection

<Modal>
  <ScrollView>
    <View flex={1} onStartShouldSetResponder={() => true}> // or flexGrow={1}
       YOUR CONTENT HERE
    </View>
  </ScrollView>
</Modal>
Read more comments on GitHub >

github_iconTop Results From Across the Web

ScrollView inside swipeable modal is not working · Issue #236
This works for me for fixing horizontal scroll problem. The crucial part in this solution is to set the onStartShouldSetResponder={() => true} ...
Read more >
Swipeable React-native-modal with nested ScrollView
The workaround to this issue is to add TouchableOpacity component inside ScrollView <Modal> <ScrollView> <TouchableOpacity> .
Read more >
Swipeable Scrollview inside modal - Expo Snack
Try this project on your phone! Use Expo's online editor to make changes and save your own copy.
Read more >
Build an awesome scrollable modal in React Native | Theodo
To avoid the collision between the scroll of your content and the swipe to close the modal, you have to specify swipeArea and...
Read more >
react-native-modal - npm.io
In the meanwhile as a workaround you can set the hideModalContentWhileAnimating prop to true : this seems to solve the issue. Also, do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found