azerion/phaser

Double click issue on android iframe

Closed this issue · 0 comments

Running the game on android in an iframe will result in all clicks being triggered twice in the game.

This issue that we found was that buttons where pressed twice on this setup:

  • Android 8.1.0
  • Webview in an app
  • Game running in an Iframe

The solution I propose is not starting mspointer input on a mobile device.

For now I have added this fix to some games:
if (!this.game.device.desktop) { this.game.input.mspointer.stop(); this.game.input.touch.start(); }