New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile Bug: Touch events no longer detected on iPhone if game pauses or hits breakpoint during pointerdown event #3887
Comments
I've figured out a work-around for this bug, though it will likely break multi-touch. In phaser.js at function Current Phaser.js code:
Edited Phaser.js code:
The game freeze happens because |
Thanks a lot for filing this and the detailed explanations @maximtsai . As a workaround I tried to remove the input listener when the game loses focus and add it back when it returns. For me the problem is particularly with using Facebook instant platform's function which opens a modal dialog which causes my game to lose control. This is what I tried:
However this doesn't solve the problem. Any idea why? |
Hi @photonstorm do you think the workaround suggested by @maximtsai would be safe to use as long as I don't use multi touch in my game? Or do you know of any other workarounds to use until this bug is fixed? Thanks! |
I've been looking at this all morning and I'm struggling to replicate it using Phaser 3.13 Beta 1. I added a call to I've pulled the drop-down menu down many, many times, tapping while doing so, letting go quickly, letting go slowly, etc. I've even tried multi-tasking in iOS with another app docked alongside Safari, then pulling the drop-down and it still works. Is there some other trick to doing this?! Or has it just been inadvertently fixed in a recent Phaser update without realizing it? |
@photonstorm I used to be able to consistently reproduce it with FBInstant's APIs. If I can get my hands on 3.13 beta 1 I would be able to tell you if I can still reproduce it. |
You can find 3.13 in the master branch, or if you need a pre-built file use this: |
@photonstorm I think the issue is not present anymore, however, the game runs at a very low FPS (like 6 fps on an iPhone) after bumping up Phaser. If I just replace phaser.min.js with the older version with no other change the game becomes fast again. |
That’s nothing to do with this issue though, so I’m going to close this off. |
Just to say that I've uploaded 3.15 Beta 1, which I'm hopeful resolves this bug fully. You can find it in the master branch, or if you need a pre-built file grab it from my comment in #3756 |
On ios devices, 'pointerdown' events created using
this.input.on('pointerdown', myFunc, this)
orimage.on('pointerdown', myFunc, this)
will no longer fire if the game pauses during the execution of its callback function. This can happen if a debugger statement or breakpoint is placed inside themyFunc
callback function. It can also happen to users if the drag down menu (http://ift.tt/1n2dgPw) is pressed while simultaneously pressing inside the game. The second case may take a few tries to reproduce but here is a video of me reproducing the bug: https://youtu.be/aCICmilOrz8Reproduced on iPhone 6S+ (10.3.2), iPhone 6 Plus (11.1), and iPad Air 4G (10.3.2)
This issue does not occur on Android devices or any PCs (tested on Mac Safari and Windows Chrome)
Sample code that can trigger the bug:
HTML:
The text was updated successfully, but these errors were encountered: