From 56a6f246d6c3aa2f37e83d7cf5d35d470657f5e8 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 7 Dec 2021 16:31:28 -0500 Subject: [PATCH] fix(login(js)): input focus on TOTP field --- UI/Templates/MainUI/SOGoRootPage.wox | 6 +++++- UI/WebServerResources/js/Main/Main.app.js | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/UI/Templates/MainUI/SOGoRootPage.wox b/UI/Templates/MainUI/SOGoRootPage.wox index 6c14e7216..6539eddbd 100644 --- a/UI/Templates/MainUI/SOGoRootPage.wox +++ b/UI/Templates/MainUI/SOGoRootPage.wox @@ -134,7 +134,11 @@ lock - +
diff --git a/UI/WebServerResources/js/Main/Main.app.js b/UI/WebServerResources/js/Main/Main.app.js index 8580e1635..80da04bf6 100644 --- a/UI/WebServerResources/js/Main/Main.app.js +++ b/UI/WebServerResources/js/Main/Main.app.js @@ -9,8 +9,8 @@ /** * @ngInject */ - LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication']; - function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication) { + LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication', 'sgFocus']; + function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication, focus) { var vm = this; this.$onInit = function() { @@ -43,6 +43,7 @@ if (data.totpmissingkey) { vm.loginState = 'totpcode'; + focus('totpcode'); } else if (data.totpdisabled) { vm.loginState = 'totpdisabled';