mobomo / sketch.js

A jQuery plugin for dead simple Canvas-based drawing.
http://intridea.github.com/sketch.js
290 stars 110 forks source link

Cannot draw multiple times in iPad safari #27

Open meetwudi opened 9 years ago

patrickdevivo commented 9 years ago

+1

webmajstr commented 8 years ago

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

jwcarr commented 8 years ago

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.