feat: make avatar modals open when enter is pressed

This commit is contained in:
Spectralitree 2021-12-11 16:25:58 +01:00
parent 4c7869ae1d
commit b5e15ed589

View File

@ -19,7 +19,7 @@
<span style="vertical-align: middle;">{item.name} ({item.id})</span>
</div>
{#if item && item.avatar_url}
<img on:click={toggleAvatarModal} class="rounded-circle avatar" src={item.avatar_url} alt="Your system avatar" />
<img tabindex={0} on:keyup={(event) => {if (event.key === "Enter") avatarOpen = true}} on:click={toggleAvatarModal} class="rounded-circle avatar" src={item.avatar_url} alt="Your system avatar" />
{:else}
<img class="rounded-circle avatar" src={default_avatar} alt="your system avatar (default)" />
{/if}