Jump to content

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


JesusJoseph
 Share

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.
https://github.com/pbakondy/cordova-plugin-screensize

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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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