Skip to content

Commit

Permalink
NewGame: set autoFocus to first input
Browse files Browse the repository at this point in the history
  • Loading branch information
ggounot committed Sep 5, 2023
1 parent 2d1f17b commit e9bc555
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/NewGame.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,15 @@
{#each players as player, i (player)}
<li class="flex flex-row items-center gap-4">
<!-- Name input -->
<!-- svelte-ignore a11y-autofocus -->
<input
class="input-bordered input w-full"
type="text"
name="name"
placeholder="Name"
bind:value={player.name}
required
autofocus={i === 0}
/>

<!-- Color selector -->
Expand Down

0 comments on commit e9bc555

Please sign in to comment.