refactor: replace username old focus logic with the autofocus attribute
<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;
},
