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