Skip to content

Commit

Permalink
Add touchend handler - see isaacHagoel/svelte-dnd-action#557
Browse files Browse the repository at this point in the history
  • Loading branch information
preiter93 committed Dec 7, 2024
1 parent 283e502 commit 8e0d867
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/lib/components/TimerItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@
<div class="timer-item">
<div class="timer-item-content">
<div class="timer-name-row">
<button onclick={toggleIsExpanded} class="chevron">
<button
onclick={toggleIsExpanded}
ontouchend={toggleIsExpanded}
class="chevron"
>
<div>
<svg
class="chevron {isExpanded ? 'up' : 'down'}"
Expand Down
7 changes: 6 additions & 1 deletion src/lib/components/buttons/CancelButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
let { margin = "0", onclick } = $props();
</script>

<button {onclick} class="cancel-button" style="margin: {margin};">
<button
{onclick}
ontouchend={onclick}
class="cancel-button"
style="margin: {margin};"
>
<div class="center">
<CancelIcon />
</div></button
Expand Down
8 changes: 7 additions & 1 deletion src/lib/components/buttons/ControlButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
let { symbol, cls = "default", margin = "0", onclick } = $props();
</script>

<button {onclick} class={cls} style="margin: {margin};" data-testid={symbol}>
<button
{onclick}
ontouchend={onclick}
class={cls}
style="margin: {margin};"
data-testid={symbol}
>
<div class="center">
{#if symbol === "play"}
<PlayIcon />
Expand Down

0 comments on commit 8e0d867

Please sign in to comment.