aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2024-05-14 15:08:39 -0700
committerChristopher Ng <chrng8@gmail.com>2024-05-30 15:32:20 -0700
commitfad49e6aee61fc415296ac70430bd2181d033c76 (patch)
treec3b72314eb8b7625a25ad431b527d24764c91be2 /apps/settings/src
parent76104aa7091cdb42511b3e281da6b170a7f86adc (diff)
downloadnextcloud-server-fad49e6aee61fc415296ac70430bd2181d033c76.tar.gz
nextcloud-server-fad49e6aee61fc415296ac70430bd2181d033c76.zip
refactor: Shorten input focus calls
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/src')
-rw-r--r--apps/settings/src/components/Users/NewUserDialog.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/settings/src/components/Users/NewUserDialog.vue b/apps/settings/src/components/Users/NewUserDialog.vue
index 1205706153f..d869440befc 100644
--- a/apps/settings/src/components/Users/NewUserDialog.vue
+++ b/apps/settings/src/components/Users/NewUserDialog.vue
@@ -280,7 +280,7 @@ export default {
})
this.$emit('reset')
- this.$refs.username?.$refs?.inputField?.$refs?.input?.focus?.()
+ this.$refs.username?.focus?.()
this.$emit('closing')
} catch (error) {
this.loading.all = false
@@ -288,10 +288,10 @@ export default {
const statuscode = error.response.data.ocs.meta.statuscode
if (statuscode === 102) {
// wrong username
- this.$refs.username?.$refs?.inputField?.$refs?.input?.focus?.()
+ this.$refs.username?.focus?.()
} else if (statuscode === 107) {
// wrong password
- this.$refs.password?.$refs?.inputField?.$refs?.input?.focus?.()
+ this.$refs.password?.focus?.()
}
}
}