phaser-ce icon indicating copy to clipboard operation
phaser-ce copied to clipboard

Multitasking on iOS breaks input

Open Robominister opened this issue 4 years ago • 4 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: https://github.com/photonstorm/phaser/issues/3756 as it seems to be the same issue (as i understand it), but apparently not resolved on phaser 2 ce.

Robominister avatar Apr 02 '20 12:04 Robominister

Could you try

game.input.mspointer.stopOnGameOut = true;

?

samme avatar Apr 02 '20 14:04 samme

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.

Robominister avatar Apr 02 '20 15:04 Robominister

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

samme avatar Apr 02 '20 15:04 samme

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

samme avatar May 01 '20 23:05 samme