From 383701914c2120ca2220d5c9c405c2c678bb89d6 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Tue, 13 Sep 2022 14:53:10 +0200 Subject: Set focus to input field Fix: - TypeError: this.$refs.user.focus is not a function - TypeError: this.$refs.password.focus is not a function Signed-off-by: Daniel Kesselberg --- core/src/components/login/LoginForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/src') diff --git a/core/src/components/login/LoginForm.vue b/core/src/components/login/LoginForm.vue index 51966868b5e..2ab4035ae65 100644 --- a/core/src/components/login/LoginForm.vue +++ b/core/src/components/login/LoginForm.vue @@ -203,10 +203,10 @@ export default { mounted() { if (this.username === '') { - this.$refs.user.focus() + this.$refs.user.$refs.inputField.$refs.input.focus() } else { this.user = this.username - this.$refs.password.focus() + this.$refs.password.$refs.inputField.$refs.input.focus() } }, -- cgit v1.2.3