mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 23:34:22 -04:00
refactor: Shorten input focus calls
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
76104aa709
commit
fad49e6aee
1 changed files with 3 additions and 3 deletions
|
|
@ -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?.()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue