Jump to content

window.innerWidth returns zero in Android App after pressing back button


Recommended Posts

Hi All,
Thanks for reading.
I am creating a Game using Phaser and Cordova. I use window.innerWidth to set the width of the game. 

It works correctly for the first time by returning the screen width.

But after I closing the game by press the back button in my android mobile it's not working.

When I open the game again the window.innerWidth is returning as 0  and not the screen width. 

I try to get the width using the below Cordova plugin but it's not working.

Any help will really helpful. Tried for the whole day but nothing works.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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