Skip to content

Commit 3349a4f

Browse files
mars-lanferrannp
authored andcommitted
fix: disable interaction when fading out modal (#1116)
While the animation only last < 300ms, it is possible for user to interact with the modal during the transition. This is based on a fix suggested in facebook/react-native#6732
1 parent b587874 commit 3349a4f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/components/Modal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ class Modal extends React.Component<Props, State> {
180180
const { colors } = theme;
181181
return (
182182
<Animated.View
183+
pointerEvents={this.props.visible ? 'auto' : 'none'}
183184
accessibilityViewIsModal
184185
accessibilityLiveRegion="polite"
185186
style={StyleSheet.absoluteFill}

0 commit comments

Comments
 (0)