refactor: replace username old focus logic with the autofocus attribute (#2223)

This commit is contained in:
Yasin Silavi 2022-11-25 14:56:07 +03:30 committed by GitHub
parent 02db83c72e
commit 2b2c1085fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -6,10 +6,10 @@
<div v-if="error !== ''" class="wrong">{{ error }}</div> <div v-if="error !== ''" class="wrong">{{ error }}</div>
<input <input
autofocus
class="input input--block" class="input input--block"
type="text" type="text"
autocapitalize="off" autocapitalize="off"
ref="username"
v-model="username" v-model="username"
:placeholder="$t('login.username')" :placeholder="$t('login.username')"
/> />
@ -71,8 +71,6 @@ export default {
}; };
}, },
mounted() { mounted() {
this.focusUsername();
if (!recaptcha) return; if (!recaptcha) return;
window.grecaptcha.ready(function () { window.grecaptcha.ready(function () {
@ -82,9 +80,6 @@ export default {
}); });
}, },
methods: { methods: {
focusUsername() {
this.$refs.username.focus();
},
toggleMode() { toggleMode() {
this.createMode = !this.createMode; this.createMode = !this.createMode;
}, },