fix: avoid clicking behind dialogs
This commit is contained in:
parent
e7f9e8e7f7
commit
8dea3389ee
|
@ -4,6 +4,7 @@ import React from 'react';
|
||||||
import {
|
import {
|
||||||
Text,
|
Text,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
|
TouchableWithoutFeedback,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
|
||||||
|
@ -51,28 +52,29 @@ class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
|
||||||
const { _dialogStyles, style } = this.props;
|
const { _dialogStyles, style } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View
|
<TouchableWithoutFeedback>
|
||||||
pointerEvents = 'box-none'
|
|
||||||
style = { [
|
|
||||||
styles.overlay,
|
|
||||||
style
|
|
||||||
] }>
|
|
||||||
<View
|
<View
|
||||||
pointerEvents = 'box-none'
|
|
||||||
style = { [
|
style = { [
|
||||||
_dialogStyles.dialog,
|
styles.overlay,
|
||||||
this.props.style
|
style
|
||||||
] }>
|
] }>
|
||||||
<TouchableOpacity
|
<View
|
||||||
onPress = { this._onCancel }
|
pointerEvents = 'box-none'
|
||||||
style = { styles.closeWrapper }>
|
style = { [
|
||||||
<Icon
|
_dialogStyles.dialog,
|
||||||
name = 'close'
|
this.props.style
|
||||||
style = { _dialogStyles.closeStyle } />
|
] }>
|
||||||
</TouchableOpacity>
|
<TouchableOpacity
|
||||||
{ this._renderContent() }
|
onPress = { this._onCancel }
|
||||||
|
style = { styles.closeWrapper }>
|
||||||
|
<Icon
|
||||||
|
name = 'close'
|
||||||
|
style = { _dialogStyles.closeStyle } />
|
||||||
|
</TouchableOpacity>
|
||||||
|
{ this._renderContent() }
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</TouchableWithoutFeedback>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue