Skip to content

touchX/touchY or mouseX/mouseY reporting wrong in iOS 7.0.x #1269

@noisefactor

Description

@noisefactor

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.)

http://artcontext.org/act/96/draward/foo.html

function setup(){
createCanvas(500,500);
}
function draw(){
background("blue");
}
function touchStarted(){
document.title=(touchX+" "+touchY);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions