Try focus on username input on mount

This commit is contained in:
2022-03-05 20:36:00 +01:00
parent 1d2e88749c
commit 7dd2d3ee82
2 changed files with 12 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
<div class="form">
<seasoned-input
ref="username"
placeholder="username"
icon="Email"
type="email"
@@ -100,6 +101,11 @@ export default {
}
});
}
},
mounted() {
try {
this.$refs.username.$el.getElementsByTagName("input")[0].focus();
} catch {}
}
};
</script>

View File

@@ -4,6 +4,7 @@
<div class="form">
<seasoned-input
ref="username"
placeholder="username"
icon="Email"
type="email"
@@ -90,6 +91,11 @@ export default {
created() {
document.title = "Sign in" + storage.pageTitlePostfix;
storage.backTitle = document.title;
},
mounted() {
try {
this.$refs.username.$el.getElementsByTagName("input")[0].focus();
} catch {}
}
};
</script>