Recently, my app was rejected because of this error:
Application is truncated when opened in multi-window/ pop-up view
Here is a preview of the issue:
However, I cannot find any documentation on how to detect this change with JavaScript. I cannot see any documentation in the Window API in Mozilla also. The closest I found was this question for Java:
The main challenge is, my app is a PWA created by PWABuilder; therefore, I have no access to the WebView
or any extra Java/Kotlin code, and I must fix it in pure JS/CSS. Further, you don’t need PWABuilder, but the result will be alike if you do it manually since it’s creating an APK:
Shipping a PWA as an Android app - YouTube
Furthermore, this issue only happens with Samsung devices. I tested the same feature in an Oppo device, and the multi-window/popup view works perfectly. No resize troubles since the view was adapted by its internal API.
From my side, I can add an onresize
event for Samsung devices only, but it may break its behavior since it won’t work as expected. It will refresh frequently if there is any resize (popup mode triggered, for example). This can become problematic since if the timer is running, it will stop, and I’ll need to figure out some crazy workaround to restore the last status. I did that with the paid app, and it is not easy to do. I don’t plan to bring this feature to this version.
Any ideas?
P.S.:
I’d advise creating a specification and sharing it with Mozilla in order to build a standard for the Window API. The closes I found was this one:
Managing several displays with the Multi-Screen Window Placement API (web.dev)
I’m quite surprised that this was never raised before because this doesn’t seem like a new topic, and the first Samsung Specification comes from 2014 (8 years ago):
Why MultiWindow was the Past, is the Present and will be the Future – Samsung Global Newsroom