Fix Popover.android to bubble events correctly

Reviewed By: andreicoman11, fkgozali

Differential Revision: D3197104

fb-gh-sync-id: 882f85175f87200b7aef1ca4204d6dfb6c4c4c69
fbshipit-source-id: 882f85175f87200b7aef1ca4204d6dfb6c4c4c69
This commit is contained in:
Dave Miller 2016-04-20 00:58:46 -07:00 committed by Facebook Github Bot 9
parent 6731de7b45
commit eb21b25e2d

View File

@ -49,13 +49,20 @@ class Modal extends React.Component {
transparent={this.props.transparent} transparent={this.props.transparent}
onRequestClose={this.props.onRequestClose} onRequestClose={this.props.onRequestClose}
onShow={this.props.onShow} onShow={this.props.onShow}
style={styles.modal}> style={styles.modal}
onStartShouldSetResponder={this._shouldSetResponder}
>
<View style={[styles.container, containerBackgroundColor]}> <View style={[styles.container, containerBackgroundColor]}>
{this.props.children} {this.props.children}
</View> </View>
</RCTModalHostView> </RCTModalHostView>
); );
} }
// We don't want any responder events bubbling out of the modal.
_shouldSetResponder(): boolean {
return true;
}
} }
Modal.propTypes = { Modal.propTypes = {