onBackdropPress not trigger
See original GitHub issueEnvironment
System: OS: macOS 10.15.5 CPU: (4) x64 Intel® Core™ i5-5287U CPU @ 2.90GHz Memory: 27.93 MB / 8.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.18.2 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.5 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: API Levels: 28, 29, 30 Build Tools: 28.0.3, 29.0.2, 30.0.1 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64 IDEs: Android Studio: 4.0 AI-193.6911.18.40.6626763 Xcode: 11.6/11E708 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.0 => 0.61.0 npmGlobalPackages: react-native-cli: 2.0.1
Platforms
I try in Android, i dont know how in ios.
Versions
- Android:
- iOS:
- react-native-modal: 11.5.6
- react-native: 0.61.0
- react: 16.9.0
Description
I try to close modal when user press back drop, but the prop onBackdropPress not trigger.
Reproducible Demo
<Modal
useNativeDriver={true}
animationIn={'fadeIn'}
animationOut={'fadeOut'}
backdropColor={'rgba(0, 0, 0, 0.7)'}
backdropOpacity={0.5}
isVisible={this.props.isOpenConsultant}
onSwipeComplete={() => this.props.close()}
swipeDirection={['down']}
style={{ justifyContent: 'flex-end', margin: 0 }}
onBackButtonPress={() => this.props.close()}
onBackdropPress={() => console.log('Hello')}>
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top GitHub Comments
Make sure the child component of the modal does not have { flex:1 }, as that seems to overwrite the touch trigger.
Also experiencing the same thing, there is no
{ flex: 1 }
in the child component