phaserjs / phaser-ce

Phaser CE is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.

Home Page:http://phaser.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multitasking on iOS breaks input

Robominister opened this issue · comments

  • Phaser version(s):
    2.15.0 CE

  • What steps produce the bug:
    Run any phaser setup using the latest CE version (2.15.0) on an ios device (i can confirm this from an iPhone X running ios 13), and use the "swipe to return home" gesture.

  • What should happen:
    You should still have touch input within the phaser game

  • What happens instead:
    Whether you fully swipe the browser away (and return to it) or partially swipe it away (so you don't actually return home, the browser comes back), we lose all input within the phaser game (we don't lose input events in the browser in general of course - i can confirm this, as other html elements are still interactive)

I have deliberately copied the title of an issue on the Phaser 3 repo:
phaserjs/phaser#3756
as it seems to be the same issue (as i understand it), but apparently not resolved on phaser 2 ce.

commented

Could you try

game.input.mspointer.stopOnGameOut = true;

?

I added this call at the beginning of the first state used in the game (as the input handler property o of the phase game instance doesn't seem to exist before the game is fully initialized?) - but that hasn't made a difference.

commented

I couldn't reproduce this, but could you try it on https://cdpn.io/samme/debug/gKqgbB and screenshot if possible, thanks.

commented

Hi @Robominister could you test this Phaser build: phaser-test.js.gz