Jump to content

Android Browser: Two apps get rendered instead of one


mraak
 Share

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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