Game screen blackout

I have created a HTML multiplayer game in cocos creator.
when the game goes in background or there is a app switch and i return to the game the game screen goes black nothing is displayed.
The vconsole button is visible though.
And this is not very often but it happens.
Any solution