From 1bce1524dbe137dfc9c66b0d202735d988e6c480 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: Tue, 7 Jun 2022 15:17:49 -0500 Subject: [PATCH] feat: Fix display name in prejoin stealing focus. When there is a password and lobby enabled, participants cannot enter password as the display name is stealing the focus. When there is just password set the same field steals the focus from the password prompt. --- react/features/base/conference/middleware.web.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/react/features/base/conference/middleware.web.js b/react/features/base/conference/middleware.web.js index 19d40a492..c8a5982d3 100644 --- a/react/features/base/conference/middleware.web.js +++ b/react/features/base/conference/middleware.web.js @@ -44,9 +44,14 @@ MiddlewareRegistry.register(store => next => action => { break; } case CONFERENCE_FAILED: { - enableForcedReload - && action.error?.name === JitsiConferenceErrors.CONFERENCE_RESTARTED - && dispatch(setSkipPrejoinOnReload(true)); + const errorName = action.error?.name; + + if (errorName === JitsiConferenceErrors.MEMBERS_ONLY_ERROR + || errorName === JitsiConferenceErrors.PASSWORD_REQUIRED) { + dispatch(setPrejoinPageVisibility(false)); + } else if (enableForcedReload && errorName === JitsiConferenceErrors.CONFERENCE_RESTARTED) { + dispatch(setSkipPrejoinOnReload(true)); + } break; }