Game is scaled incorrectly in an iframe

My game is embedded in an iframe and is sometimes scaled incorrectly, after resizing the window it is scaling correctly.

This is my scale configuration:

scale: {
    parent: 'app',
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH,
    width: 772,
    height: 480
}

Before creating an issue on GitHub, I wanted to ask if there is a solution for it or if I am just using it incorrectly.

I would appreciate any help.

Use and screenshot:

Sure, here’s a screenshot.

image

Can you show the whole page? And before and after the “correct” resizing?

The game is in an iframe with the same size (772x480). Hope that’s enough.

Correct:

image

Incorrect:

image