Skip to content

Commit

Permalink
fix: disable interaction when fading out modal (callstack#1116)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mars-lan authored and ferrannp committed Jun 13, 2019
1 parent b587874 commit 3349a4f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class Modal extends React.Component<Props, State> {
const { colors } = theme;
return (
<Animated.View
pointerEvents={this.props.visible ? 'auto' : 'none'}
accessibilityViewIsModal
accessibilityLiveRegion="polite"
style={StyleSheet.absoluteFill}
Expand Down

0 comments on commit 3349a4f

Please sign in to comment.