Skip to content

Commit

Permalink
Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
Loudbooks committed Oct 8, 2024
1 parent d904690 commit 424bac2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let button: HTMLButtonElement;
let usernameInput: HTMLInputElement;
async function requestReport(_: MouseEvent) {
async function requestReport() {
button.innerHTML = "Working...";
setTimeout(async () => {
Expand Down Expand Up @@ -40,7 +40,13 @@
<spacer/>
<items>
<input-container>
<input placeholder="Preferred Username" on:input={checkUsernameInput} bind:this={usernameInput}>
<input placeholder="Preferred Username" on:input={checkUsernameInput} on:keyup={
(event) => {
if (event.key === "Enter") {
requestReport();
}
}
} bind:this={usernameInput}>
</input-container>
<button id="submit" on:click={requestReport} bind:this={button}>
Continue
Expand Down

0 comments on commit 424bac2

Please sign in to comment.