Send tap event if swipe is not detected

This commit is contained in:
2021-11-23 12:00:54 +01:00
parent ded276b8a0
commit 43708399e4
2 changed files with 7 additions and 1 deletions

View File

@@ -64,6 +64,11 @@ export const swipe = (
node.dispatchEvent(
new CustomEvent('swipe', { detail: direction })
)
} else {
// Dispatch tap event
node.dispatchEvent(
new CustomEvent('tap', { detail: true })
)
}
}
node.addEventListener('pointerup', onUp, false)