From f6131267760b04b9b4c655c75d4f9ea3e275e013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=8F=D0=BD=20=D0=9C=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=BE=D0=B2?= Date: Fri, 17 Jun 2022 14:29:16 +0300 Subject: [PATCH] fix: Hides pre join screen in few login window cases. In Firefox pre-join was grabbing the focus and yuo cannot type username and password after clicking I'm the host button. --- connection.js | 6 +++++- modules/UI/authentication/AuthHandler.js | 2 ++ react/features/authentication/middleware.native.js | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/connection.js b/connection.js index 547705f6d..bed4aed67 100644 --- a/connection.js +++ b/connection.js @@ -20,7 +20,10 @@ import { import { isFatalJitsiConnectionError } from './react/features/base/lib-jitsi-meet/functions'; import { getCustomerDetails } from './react/features/jaas/actions.any'; import { isVpaasMeeting, getJaasJWT } from './react/features/jaas/functions'; -import { setPrejoinDisplayNameRequired } from './react/features/prejoin/actions'; +import { + setPrejoinDisplayNameRequired, + setPrejoinPageVisibility +} from './react/features/prejoin/actions'; const logger = Logger.getLogger(__filename); /** @@ -244,6 +247,7 @@ function requestAuth(roomName) { resolve(connection); }; + APP.store.dispatch(setPrejoinPageVisibility(false)); APP.store.dispatch( openDialog(LoginDialog, { onSuccess, roomName }) diff --git a/modules/UI/authentication/AuthHandler.js b/modules/UI/authentication/AuthHandler.js index eb79ecb69..f2b03fc0f 100644 --- a/modules/UI/authentication/AuthHandler.js +++ b/modules/UI/authentication/AuthHandler.js @@ -17,6 +17,7 @@ import { import { getReplaceParticipant } from '../../../react/features/base/config/functions'; import { isDialogOpen } from '../../../react/features/base/dialog'; import { setJWT } from '../../../react/features/base/jwt'; +import { setPrejoinPageVisibility } from '../../../react/features/prejoin'; import UIUtil from '../util/UIUtil'; import ExternalLoginDialog from './LoginDialog'; @@ -180,6 +181,7 @@ function authenticate(room: Object, lockPassword: string) { if (isTokenAuthEnabled(config) || room.isExternalAuthEnabled()) { doExternalAuth(room, lockPassword); } else { + APP.store.dispatch(setPrejoinPageVisibility(false)); APP.store.dispatch(openLoginDialog()); } } diff --git a/react/features/authentication/middleware.native.js b/react/features/authentication/middleware.native.js index 338ab00b2..421e3ba1c 100644 --- a/react/features/authentication/middleware.native.js +++ b/react/features/authentication/middleware.native.js @@ -15,6 +15,7 @@ import { JitsiConnectionErrors } from '../base/lib-jitsi-meet'; import { MiddlewareRegistry } from '../base/redux'; +import { setPrejoinPageVisibility } from '../prejoin'; import { CANCEL_LOGIN, @@ -120,6 +121,7 @@ MiddlewareRegistry.register(store => next => action => { && error.name === JitsiConnectionErrors.PASSWORD_REQUIRED && typeof error.recoverable === 'undefined') { error.recoverable = true; + store.dispatch(setPrejoinPageVisibility(false)); store.dispatch(openLoginDialog()); } break;