Skip to content

Commit

Permalink
refactor: replace username old focus logic with the autofocus attribu…
Browse files Browse the repository at this point in the history
  • Loading branch information
freakingeek authored and AlencarGabriel committed Feb 6, 2023
1 parent 01ee413 commit 8efa0c8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions frontend/src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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')"
/>
Expand Down Expand Up @@ -71,8 +71,6 @@ export default {
};
},
mounted() {
this.focusUsername();
if (!recaptcha) return;
window.grecaptcha.ready(function () {
Expand All @@ -82,9 +80,6 @@ export default {
});
},
methods: {
focusUsername() {
this.$refs.username.focus();
},
toggleMode() {
this.createMode = !this.createMode;
},
Expand Down

0 comments on commit 8efa0c8

Please sign in to comment.