mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 19:46:36 +00:00
Use mousedown
events instead of click
This commit is contained in:
parent
890c99def5
commit
6b84b51238
2 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
>
|
>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue