Skip to content

Commit 99a066b

Browse files
committed
Merge branch 'TylerRick-Tab-click_cancellable_using_event.defaultPrevented'
2 parents 2273e28 + 4d9fa84 commit 99a066b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/tab/src/Tab.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
aria-selected={active ? 'true' : 'false'}
3232
tabindex={active || forceAccessible ? '0' : '-1'}
3333
{href}
34-
on:click={() => instance && instance.handleClick()}
34+
on:click={(event) =>
35+
!event.defaultPrevented && instance && instance.handleClick()}
3536
{...internalAttrs}
3637
{...exclude($$restProps, ['content$', 'tabIndicator$'])}
3738
>

0 commit comments

Comments
 (0)