Jump to content

Android Browser: Two apps get rendered instead of one


Recommended Posts

Very weird, I see two games on Android Browser, one overlapping the other, with one being displayed in the top left, and one centered as per CSS. Has someone encountered that already? It shows only one game in every other browser on any device. 


If I don't specify the target div in the Game constructor, and let it create the div, then it is working OK and only one game gets rendered.

Game.super_.call(this, 500, 330, Phaser.CANVAS, "game_div");
<html>    <head>        <meta charset="utf-8">        <title>Phaser game</title>        <meta http-equiv="X-UA-Compatible" content="chrome=1, IE=9">        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimum-scale=1, maximum-scale=1,minimal-ui">        <style type="text/css">            head, body, #game            {                margin: 0px;                padding: 0px;                width: 100%;                height: 100%;            }        </style>    </head>    <body>        <div id="game_div"></div>        <script src="main.js" type="text/javascript" charset="utf-8"></script>    </body></html>
Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...