Touchable/onPress components not woking inside a Modal
See original GitHub issueIssue with Modal
I have implemented Touchable inside modal but onPress is not working in iOS, it is working on android. Any help will be appreciated.
<Modal isVisible={true}>
<TouchableOpacity onPress={hide} style={styles.backContainer}>
<Icon
family="entypo"
name="chevron-small-left"
size={22}
color={colors.textColor}
/>
<Text
size={10}
lineHeight={16}
weight="semi-bold"
color={colors.textColor}
style={styles.back}>
Back
</Text>
</TouchableOpacity>
</Modal>
Issue Analytics
- State:
- Created 2 years ago
- Reactions:16
- Comments:5
Top Results From Across the Web
TouchableOpacity and button not working in react native Modal?
My problem was that I imported the TouchableOpacity from the react-native-gesture-handler package, rather then the default react-native ...
Read more >React Native Modal Tutorial with Examples - positronX.io
In this tutorial, we will learn how to show essential content such as text and image with Modal popup in React Native application....
Read more >react-native-popover-view - npm
A well-tested, adaptable, lightweight <Popover> component for react-native with no dependencies. Tested and working on iOS and Android.
Read more >keyboardavoidingview modal | The search engine you control.
The problem with this code is that animation takes forever. First, modal show up, then keyboard and then (!!!) the input animates up....
Read more >How to Show a Modal in React Native
React Native Modal is a component to present content above an enclosing view. ... please remove it as it may cause unexpected issues:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem but only with the iPhone 12 pro simulator. I don’t know why but I solved it by resetting the simulator and reinstalling the app.
Importing
TouchableOpacity
from ‘react-native’ instead of importing from ‘react-native-gesture-handler’ solved the issue for me. Hope it will help You!