I'm experiencing a ~500ms delay in Safari for iOS when binding the touchstart
event to a KineticJS circle object. I've tried calling event.preventDefault()
within the on
function, thinking that this would override the default iOS behavior, but it made no difference. I'm not sure whether this has anything to do with KineticJS, which is why I left that out of the title (but included it as a tag). Note: there is no delay using the iOS simulator – the delay is only happening on the actual device (iPhone 4). Any ideas?
var stage = new Kinetic.Stage({
container: "container",
width: $(window).width(),
height: $(window).height(),
});
var layer = new Kinetic.Layer();
var circle = new Kinetic.Circle({
x: stage.getWidth() / 2,
y: stage.getHeight() / 2,
radius: 70,
fill: "black",
});
layer.add(circle);
stage.add(layer);
circle.on("touchstart", function() {
this.setFill("red");
layer.draw();
});