Browse Source

fix(authentication) fixed close on cancel click

master
Calin Chitu 3 years ago
parent
commit
9d5024cc5d

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

@@ -124,15 +124,8 @@ class LoginDialog extends Component<Props, State> {
124 124
      */
125 125
     _onCancelLogin() {
126 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 131
     _onLogin: () => void;
@@ -252,6 +245,7 @@ class LoginDialog extends Component<Props, State> {
252 245
 
253 246
         return (
254 247
             <Dialog
248
+                disableBlanketClickDismiss = { true }
255 249
                 hideCloseIconButton = { true }
256 250
                 okDisabled = {
257 251
                     connecting

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

@@ -64,15 +64,8 @@ class WaitForOwnerDialog extends PureComponent<Props> {
64 64
      */
65 65
     _onCancelWaitForOwner() {
66 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 71
     _onIAmHost: () => void;
@@ -102,6 +95,7 @@ class WaitForOwnerDialog extends PureComponent<Props> {
102 95
 
103 96
         return (
104 97
             <Dialog
98
+                disableBlanketClickDismiss = { true }
105 99
                 hideCloseIconButton = { true }
106 100
                 okKey = { t('dialog.IamHost') }
107 101
                 onCancel = { this._onCancelWaitForOwner }

Loading…
Cancel
Save