mobomo/sketch.js

Cannot draw multiple times in iPad safari

Opened this issue · 3 comments

Cannot draw multiple times in iPad safari

I spotted this problem in any other mobile browser (android chrome, iOs safari, WP IE)

I encountered the same issue and got it working by changing the line

if (e.originalEvent && e.originalEvent.targetTouches) {

to:

if (e.originalEvent && e.originalEvent.targetTouches && e.originalEvent.targetTouches.length > 0) {

I'm not a strong JavaScript programmer, so I'm not entirely sure why this works – but it fixed the issue for me.