Does not work touch event with iPad Pro (iOS 15.6.1)


I have implemented mouse and touch events as follows, but mouse events are fired on iPad Pro.
Touch events are not fired.
iOS: 15.6.1

iPhone, Android devices are working fine.

Could not add pc.EVENT_TOUCHSTART on iPad Pro?, this.onMouseDown, this);, this.onMouseUp, this);, this.onMouseMove, this);

// Touch events
if ( {, this.onTouchStart, this);, this.onTouchEnd, this);, this.onTouchEnd, this);, this.onTouchMove, this);

I would appreciate it if anyone with more information could give me some advice.

Thank you.

Odd, they should work :thinking:

I don’t have access to an iPad but trying it on Browserstack seems fine

Project: Detecting a double tap | Learn PlayCanvas

1 Like

Can you post a project that reproduces your issue please?

Hi, yaustar

Thanks you for your reply.

I’m confusing now…

I confirmed Touch events has working fine other project on iPad Pro.
I implemented it in a slightly different way this time, probably I wondered if those codes were the problem.

Fisrt of all, I will organize my code.

Hi yaustar,

In this project, I used iframe and CSS3Remderer to show youtube.

Also, the project uses a virtual joystick to move the player.

Touch operation is possible in the development mode of the browser, but the UI controller does not work on Safari the actual iPad Pro.
iOS 15.6.1
Chrome works fine.

Also, It worked on my Android device. iPhone is unconfirmed.

I think the iframe is suspicious, and when I disabled the iframe entity, the UI controller works fine on Safari and the actual iPad Pro as well.

Project here

Do iframe and CSS3Renderere have some issues on iOS safari?

The problem was the code switches the controller processing between mobile and PC.

The iPad Pro could not respond to touch because it was return false under the follorwing conditions.

if( (app.touch && {
  // detach and atach app.touch

Therefore, by adding the user agent for iPad Pro to conditions, it become works fine, the code like below

let ipadpro;
if(navigator.userAgent.indexOf('Macintosh') > 0 &&
'ontouchend' in document) {
    ipadpro = true;

if( (app.touch && || ipadpro){
  // detach and atach app.touch

The problem solved and delete project url.

Thank you.


Just to follow up with this, the issue is that iPad OS no longer tells browsers that it is a mobile browser, hence the check fails.

It might be enough to just do the following:

if( (app.touch) {
  // detach and atach app.touch

Instead of checking the agent.

1 Like