Elements in fullscreen web apps on Android Chrome v77.0.3865.116 cannot always be sized to fullscreen.
-
Serve the web app and visit on Android Chrome. E.g.,
live-server --host=192.168.1.42
. -
Install the web app on your home screen.
-
Launch the web app and rotate to landscape.
-
Press the home virtual button and note the orientation reverts to portrait.
-
Swipe the home screen right to open the Google feed (or visit another app but this may reproduce less reliably).
-
Swipe back.
-
Launch the web app without changing the orientation. The blue canvas should completely cover the red body but doesn't.
- In this scenario,
screen.height
is correct but all other height measurements includingdocument.documentElement.clientHeight
are incorrect. - The body is visible and correctly fullscreen but the canvas element cannot be resized to match.
- The issue does not seem to occur when using
"display": "standalone"
instead of"fullscreen"
. I was unable to discover a workaround. - The issue resolves on orientation change but this is not possible for a fullscreen game app specifying a fixed orientation.