feat: auto-focus new chords

This commit is contained in:
2024-04-06 18:08:16 +02:00
parent 8087d10d5a
commit 3af65106bf

View File

@@ -99,9 +99,11 @@
let hasFocus = false; let hasFocus = false;
</script> </script>
<!-- svelte-ignore a11y-autofocus -->
<div <div
on:keydown={keypress} on:keydown={keypress}
on:mousedown={clickCursor} on:mousedown={clickCursor}
autofocus={chord.phrase.length === 0}
role="textbox" role="textbox"
tabindex="0" tabindex="0"
bind:this={box} bind:this={box}