浏览代码

fix: avoid clicking behind dialogs

master
Bettenbuk Zoltan 6 年前
父节点
当前提交
8dea3389ee
共有 1 个文件被更改,包括 20 次插入18 次删除
  1. 20
    18
      react/features/base/dialog/components/native/BaseDialog.js

+ 20
- 18
react/features/base/dialog/components/native/BaseDialog.js 查看文件

4
 import {
4
 import {
5
     Text,
5
     Text,
6
     TouchableOpacity,
6
     TouchableOpacity,
7
+    TouchableWithoutFeedback,
7
     View
8
     View
8
 } from 'react-native';
9
 } from 'react-native';
9
 
10
 
51
         const { _dialogStyles, style } = this.props;
52
         const { _dialogStyles, style } = this.props;
52
 
53
 
53
         return (
54
         return (
54
-            <View
55
-                pointerEvents = 'box-none'
56
-                style = { [
57
-                    styles.overlay,
58
-                    style
59
-                ] }>
55
+            <TouchableWithoutFeedback>
60
                 <View
56
                 <View
61
-                    pointerEvents = 'box-none'
62
                     style = { [
57
                     style = { [
63
-                        _dialogStyles.dialog,
64
-                        this.props.style
58
+                        styles.overlay,
59
+                        style
65
                     ] }>
60
                     ] }>
66
-                    <TouchableOpacity
67
-                        onPress = { this._onCancel }
68
-                        style = { styles.closeWrapper }>
69
-                        <Icon
70
-                            name = 'close'
71
-                            style = { _dialogStyles.closeStyle } />
72
-                    </TouchableOpacity>
73
-                    { this._renderContent() }
61
+                    <View
62
+                        pointerEvents = 'box-none'
63
+                        style = { [
64
+                            _dialogStyles.dialog,
65
+                            this.props.style
66
+                        ] }>
67
+                        <TouchableOpacity
68
+                            onPress = { this._onCancel }
69
+                            style = { styles.closeWrapper }>
70
+                            <Icon
71
+                                name = 'close'
72
+                                style = { _dialogStyles.closeStyle } />
73
+                        </TouchableOpacity>
74
+                        { this._renderContent() }
75
+                    </View>
74
                 </View>
76
                 </View>
75
-            </View>
77
+            </TouchableWithoutFeedback>
76
         );
78
         );
77
     }
79
     }
78
 
80
 

正在加载...
取消
保存