You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the right conditions, touches linger after the app is backgrounded on iOS, and then are delivered to Lua via the callbacks with many of the values as nil immediately upon resuming. I'll attach some test code that demonstrates this case. To reproduce, just add the follow code to the anim-basic sample, by putting a print statement in it for each of its parameters like so:
MOAIInputMgr.device.touch:setCallback (
function ( eventType, index, x, y, tapCount )
print ( eventType, index, x, y, tapCount )
end
)
You then run on a device, then drag your finger around constantly. While dragging, hit the home key. Then, watch the console output and reopen the app on the device. Sometimes you'll see a new print out (or multiple) that have nil values for many of the parameters. That's your repro case. I'd suggest that the queue of touch events be cleared out as this bug can cause some pretty serious issues in the right conditions.
The text was updated successfully, but these errors were encountered:
This also occurs if you click outside of the moai window and then back in.
The click outside will obviously not register but the next time one clicks inside the window, the x,y will be given from outside.
Under the right conditions, touches linger after the app is backgrounded on iOS, and then are delivered to Lua via the callbacks with many of the values as nil immediately upon resuming. I'll attach some test code that demonstrates this case. To reproduce, just add the follow code to the anim-basic sample, by putting a print statement in it for each of its parameters like so:
MOAIInputMgr.device.touch:setCallback (
function ( eventType, index, x, y, tapCount )
print ( eventType, index, x, y, tapCount )
end
)
You then run on a device, then drag your finger around constantly. While dragging, hit the home key. Then, watch the console output and reopen the app on the device. Sometimes you'll see a new print out (or multiple) that have nil values for many of the parameters. That's your repro case. I'd suggest that the queue of touch events be cleared out as this bug can cause some pretty serious issues in the right conditions.
The text was updated successfully, but these errors were encountered: