1

I have a HTML5 app, wich I want to port to Ubuntu as a Cordova app with Ubuntu SDK. It use touch events on a canvas and works fine in any browser, but no with Cordova. I bind the events like this:

canvas.addEventListener("touchstart", touchStart, false);
canvas.addEventListener("touchend", touchEnd, false);

But touchStart and touchEnd functions are never called. It still not work with canvas.ontouchstart = touchStart however ontouchstart in canvas returns true. Is there any way to get/emulate the event with the sdk?

Thank you!

1 Answer 1

0

Try wrapping the listener in anonymous function like this:

canvas.addEventListener("touchstart", function() {touchStart;}, false);

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .