Skip to content

Commit

Permalink
HOTPATCH fix for AppRailTile forwarded events
Browse files Browse the repository at this point in the history
  • Loading branch information
endigo9740 committed Dec 18, 2022
1 parent 9e4e507 commit b14d74c
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions src/lib/components/AppRail/AppRailTile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,14 @@

<!-- @component A navigation tile for the App Rail. -->

<svelte:element
this={tag}
{...prunedRestProps()}
class="app-rail-tile {classesBase}"
on:click={onClickHandler}
on:keydown
on:keyup
on:keypress
>
<!-- Slot: Default (icon) -->
<div class="app-rail-tile-icon {regionIcon}"><slot /></div>
<!-- Label -->
{#if label}<div class="app-rail-tile-label {classesLabel}">{label}</div>{/if}
</svelte:element>
<!-- NOTE: moved event forwarding due to SvelteKit bug -->
<!-- https://github.com/skeletonlabs/skeleton/issues/727#issuecomment-1356859261 -->
<div on:click={onClickHandler} on:keydown on:keyup on:keypress>
<!-- NOTE: do not add event forwarding to <svelte:element> tags. See issue above. -->
<svelte:element this={tag} {...prunedRestProps()} class="app-rail-tile {classesBase}">
<!-- Slot: Default (icon) -->
<div class="app-rail-tile-icon {regionIcon}"><slot /></div>
<!-- Label -->
{#if label}<div class="app-rail-tile-label {classesLabel}">{label}</div>{/if}
</svelte:element>
</div>

0 comments on commit b14d74c

Please sign in to comment.