Browse Source

fix(authentication) fixed close on cancel click

master
Calin Chitu 4 years ago
parent
commit
9d5024cc5d

+ 2
- 8
react/features/authentication/components/web/LoginDialog.js View File

124
      */
124
      */
125
     _onCancelLogin() {
125
     _onCancelLogin() {
126
         const { dispatch } = this.props;
126
         const { dispatch } = this.props;
127
-        const cancelButton = document.getElementById('modal-dialog-cancel-button');
128
 
127
 
129
-        if (cancelButton) {
130
-            cancelButton.onclick = () => {
131
-                dispatch(cancelLogin());
132
-            };
133
-        }
134
-
135
-        return false;
128
+        dispatch(cancelLogin());
136
     }
129
     }
137
 
130
 
138
     _onLogin: () => void;
131
     _onLogin: () => void;
252
 
245
 
253
         return (
246
         return (
254
             <Dialog
247
             <Dialog
248
+                disableBlanketClickDismiss = { true }
255
                 hideCloseIconButton = { true }
249
                 hideCloseIconButton = { true }
256
                 okDisabled = {
250
                 okDisabled = {
257
                     connecting
251
                     connecting

+ 2
- 8
react/features/authentication/components/web/WaitForOwnerDialog.js View File

64
      */
64
      */
65
     _onCancelWaitForOwner() {
65
     _onCancelWaitForOwner() {
66
         const { dispatch } = this.props;
66
         const { dispatch } = this.props;
67
-        const cancelButton = document.getElementById('modal-dialog-cancel-button');
68
 
67
 
69
-        if (cancelButton) {
70
-            cancelButton.onclick = () => {
71
-                dispatch(cancelWaitForOwner());
72
-            };
73
-        }
74
-
75
-        return false;
68
+        dispatch(cancelWaitForOwner());
76
     }
69
     }
77
 
70
 
78
     _onIAmHost: () => void;
71
     _onIAmHost: () => void;
102
 
95
 
103
         return (
96
         return (
104
             <Dialog
97
             <Dialog
98
+                disableBlanketClickDismiss = { true }
105
                 hideCloseIconButton = { true }
99
                 hideCloseIconButton = { true }
106
                 okKey = { t('dialog.IamHost') }
100
                 okKey = { t('dialog.IamHost') }
107
                 onCancel = { this._onCancelWaitForOwner }
101
                 onCancel = { this._onCancelWaitForOwner }

Loading…
Cancel
Save