summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/index.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/index.js b/client/index.js
index 276ed2a..0bce22c 100644
--- a/client/index.js
+++ b/client/index.js
@@ -68,7 +68,8 @@ function add (x, y) {
})
}
else {
- div.addEventListener('touchstart', function(){
+ div.addEventListener('touchstart', function(e){
+ e.preventDefault()
kalimba.play( freq )
lastFreq = freq
})
@@ -82,7 +83,7 @@ if (browser.isDesktop) {
document.addEventListener('mouseup', () => { dragging = false })
}
else {
- document.addEventListener('touchstart', () => { dragging = true })
+ document.addEventListener('touchstart', (e) => { e.preventDefault(); dragging = true })
document.addEventListener('touchmove', (e) => {
e.preventDefault()
const x = Math.floor( e.touches[0].pageX / s )