Use mousedown events instead of click

This commit is contained in:
jqlio18 2022-12-21 15:46:08 -05:00
commit 6b84b51238
2 changed files with 2 additions and 1 deletions

View file

@ -281,7 +281,7 @@
active="{selectedId === item.id}" active="{selectedId === item.id}"
highlighted="{highlightedIndex === i}" highlighted="{highlightedIndex === i}"
disabled="{item.disabled}" disabled="{item.disabled}"
on:click="{(e) => { on:mousedown="{(e) => {
if (item.disabled) { if (item.disabled) {
e.stopPropagation(); e.stopPropagation();
return; return;

View file

@ -27,6 +27,7 @@
disabled="{disabled ? true : undefined}" disabled="{disabled ? true : undefined}"
{...$$restProps} {...$$restProps}
on:click on:click
on:mousedown
on:mouseenter on:mouseenter
on:mouseleave on:mouseleave
> >