TouchEnd event is missed sometimes

Hi Cocos Creator team,
When I do a long press on screen (web-mobile, web-desktop, ios and android), sometimes it doesn’t enter the touchend event when I leave the finger. My feature is touch the screen to fire, and hold the finger on screen to fire consecutive. Mostly, It works properly but sometimes the touchend event not work.
Is it a bug?

Thanks team.

1赞

May have left the trigger zone, triggering touchCancer event

I know TouchCancel event, but it’s not left the trigger zone, I also implement a handler for touchCancel too. this bug occurs when my cursor on the canvas (touch at one point and hold in a long time), but it doesn’t always occur.

I tried to log on touchstart, touchend and touchCancel, but sometimes, after I end the touch, only touchStart were logged, no touchend or touchCancel were logged on console

Which version are you using?

https://github.com/cocos/cocos-engine/blob/v3.5.2/cocos/core/platform/macro.ts#L928-L949


In the current version 3.5.2, for example, the touch event has an expiration time of 5000 milliseconds.

在2.4.3,我在touchstart和touchend、touchcancel分别记录了触摸点的getLocation,及其偶发的情况下其中有个可能为undefind,请问可能是什么原因。

I’m using version 3.5.1, this bug I met from 3.4.0. I tried to set the touch_timeout to 0 and 20000 but it’s not solved. I think the event touch has been removed so when I release the mouse, no touchend event fired, but how can I detect the touch has been removed?