Samsung Internet Browser Canvas Resolution Wrong

Hi, I’m noticing an issue where the canvas resolution on Samsung Internet Browser is wrong on Galaxy phones.

Here’s the canvas element on chrome, with the device resolution set to 1520x720:

And here’s the canvas element on samsung internet, with the same device resolution:

Once I’ve loaded the app in Samsung Internet, if I rotate my phone landscape and rotate back to portrait the issue is fixed. It looks like it’s being set wrong initally.

This is also causing text elements that are apart of the screen to appear very small, even after correcting the resolution via scripts. Is it possible to refresh / update the screen component after updating the canvas resolution?

Thanks.

Can you try the non iframed version of a published build as shown here please? Stretched image on iOS

The issue is happening on a build that was download and self hosted, so maybe the browser is passing the wrong info when the canvas is first created.

The temporary fix that worked for me was to run this code on initialize:

var actualWidth = window.innerWidth * window.devicePixelRatio; 
var actualHeight = window.innerHeight * window.devicePixelRatio; 

this.app.graphicsDevice.resizeCanvas (actualWidth, actualHeight);