-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
I believe I've discovered a bug that affects iOS (at least version 7.0.x) and possibly other mobile contexts. When I try to use touchStart() (or mousePressed()) to get the current touchX or mouseX it reports the previous touch position instead of the current touch position.
Tapping an iPad or iPhone like mine with this simple demo page shows the x and y coordinates reported in the title area. (The problem doesn't occur in the desktop/laptop view of the page.)
function setup(){
createCanvas(500,500);
}
function draw(){
background("blue");
}
function touchStarted(){
document.title=(touchX+" "+touchY);
}