fix(ios): forces host page to use full allotted area

This commit is contained in:
jahorton 2022-05-18 09:48:33 +07:00
parent b90f22f578
commit 9dd69f4ee5
2 changed files with 7 additions and 1 deletions

View file

@ -29,6 +29,12 @@ sentryManager.init();
window.addEventListener('load', init, false);
function init() {
// As of iOS 15, Safari WebViews will try to avoid letting us use the "safe area"
// at the bottom of iPhone X style devices. While `-webkit-fill-available` will partly
// counteract this... it's only a "partly". Fortunately, we can manually force the
// page to our desired size.
document.body.style.height = window.outerHeight;
var kmw=window['keyman'];
// We could convert to relying on the promise, but the underlying input element
// tends to show a bit due to the delay when we do so.

View file

@ -10,7 +10,7 @@
body {background-color: rgb(210,214,220);}
</style>
</head>
<body class="kmw-embedded keyman-app">
<body class="kmw-embedded keyman-app" style="height: -webkit-fill-available">
<textarea id="ta" cols="1" rows="1" style="visibility:hidden;" disabled></textarea>
</body>
</html>