title: How create fully responsive html5 game using Phaser library?
body: <p>I'm using Phaser 2.5.0 (tried 2.4.8 also) and I'm trying to create fully responsive game using phaser library.</p>
  
  <p>Everything is ok when I refresh page, here is image:
  <a href="https://i.stack.imgur.com/JhgOh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JhgOh.png" alt="enter image description here"></a></p>
  
  <p>but when I change rotation to portrait dialog message is not ok, image:
  <a href="https://i.stack.imgur.com/PYeeJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PYeeJ.png" alt="enter image description here"></a></p>
  
  <p>When I refresh page using portrait mode I get ok dialog:
  <a href="https://i.stack.imgur.com/Nq2HM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Nq2HM.png" alt="enter image description here"></a></p>
  
  <p>So problem is when I resize browser window.</p>
  
  <p>Here is code for init phaser game: </p>
  
  <pre><code>var game = new Phaser.Game(window.innerWidth, window.innerHeight, Phaser.AUTO);
  </code></pre>
  
  <p>Tried also:</p>
  
  <pre><code>var game = new Phaser.Game("100%", "100%", Phaser.AUTO);
  </code></pre>
  
  <p>Here is create function located in main.js:</p>
  
  <pre><code>    create: function(){
          console.log('create');
  
          this.game.antialias = true;
          this.game.stage.smoothed = true;
          this.input.maxPointers = 1;
          this.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL;
          this.scale.minHeight = 0;
          this.game.time.advancedTiming = true;
     },
  </code></pre>
  
  <p>So to tell again problem is when I resize browser window but when I do refresh then it's not working ok. Game must support resize.</p>
  
  <p>Here is one simple example which is giving almost same result, on refresh is ok but when doing resize is not ok: <a href="https://jsfiddle.net/CroDac/tv010u0t/" rel="nofollow noreferrer">https://jsfiddle.net/CroDac/tv010u0t/</a></p>
  
  <p>Thank you</p>