From 747cd6373305042640f5f0d861eda0fdeb22cab7 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 13 Jul 2018 09:28:45 -0400 Subject: [PATCH] adjust focus on fields for browser apps --- src/angular/components/login.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/angular/components/login.component.ts b/src/angular/components/login.component.ts index e7dc0fe9d4..a9e8cd733c 100644 --- a/src/angular/components/login.component.ts +++ b/src/angular/components/login.component.ts @@ -13,6 +13,8 @@ import { AuthService } from '../../abstractions/auth.service'; import { I18nService } from '../../abstractions/i18n.service'; import { StorageService } from '../../abstractions/storage.service'; +import { Utils } from 'jslib/misc/utils'; + const Keys = { rememberedEmail: 'rememberedEmail', rememberEmail: 'rememberEmail', @@ -45,6 +47,9 @@ export class LoginComponent implements OnInit { if (this.rememberEmail == null) { this.rememberEmail = true; } + if (Utils.isBrowser) { + document.getElementById(this.email == null || this.email === '' ? 'email' : 'masterPassword').focus(); + } } async submit() {