I got a problem with my PlayCanvas application which is loaded in an iframe. This iFrame is placed in a Bootstrap Modal. The Modal is hidden by default.
The problem is, that when I open the Modal, the area, where the PlayCanvas application should be, is empty. I analysed the problem and it seems like the canvas in the iframe it is loosing its width and set it to 0.
<canvas id="application-canvas" tabindex="0" width="0" height="825" class="fill-mode-KEEP_ASPECT" style=""></canvas>
Futher I have to say, that this worked a year ago, and now I’ve made an update of my application. The old one is still woking and the new one is working, when I display the Modal on startup.
Any hints for a simple solution to fix this? My solution whould be to set the width manually by JavaScript. But why did the width get lost in first place?