fix(dashboard): do not open/close card when opening icon

This commit is contained in:
Jake/Rads 2022-06-23 23:02:03 +02:00
parent dd60f646b0
commit c3f92cec93

View File

@ -45,7 +45,7 @@
</div> </div>
<div> <div>
{#if item && (item.avatar_url || item.icon)} {#if item && (item.avatar_url || item.icon)}
<img tabindex={0} on:keyup={(event) => {if (event.key === "Enter") avatarOpen = true}} on:click={toggleAvatarModal} class="rounded-circle avatar" src={icon_url} alt={altText} /> <img tabindex={0} on:keydown|stopPropagation={(event) => {if (event.key === "Enter") {avatarOpen = true}}} on:click|stopPropagation={toggleAvatarModal} class="rounded-circle avatar" src={icon_url} alt={altText} />
{:else} {:else}
<img class="rounded-circle avatar" src={default_avatar} alt="icon (default)" /> <img class="rounded-circle avatar" src={default_avatar} alt="icon (default)" />
{/if} {/if}