Hi,
using the bellow snippet I was able to reproduce a behaviour that appears to be a bug. If an Interstitial ad is shown when the device is in landscape mode, width and height values received from mraid.getScreenSize() are incorrect (width and height values appear to be switched), and keep being incorrect after further device orientation changes. If an ad is shown when the device is in portrait mode, it works as expected.
<div id="text" style="width: 300px; height:300px; background-color: yellow;"></div>
<script src='mraid.js'></script>
<script>
setInterval(function(){
var screenSize = mraid.getScreenSize();
document.getElementById('text').innerText = 'Width: ' + screenSize.width + ', height: ' + screenSize.height + ', time: ' + Date.now();
}, 1000);
</script>
Issue happens in Interstitial ads on Android.
window.MRAID_ENV content is {"version":"3.0","sdk":"Google Mobile Ads","sdkVersion":"17.1.22-000"}
I was able to reproduce the issue on:
- Samsung Galaxy S5, Android 6.0
- Nexus 5, Android 6.0
- Samsung Galaxy S9, Android 8.0
- Pixel 2, Android 8.1
Attached are screenshots in landscape and portrait mode.
Thanks,
Gregor