Closed sjoerdloeve closed 4 years ago
Created a simple work around for now:
Check for document height and screen height and if they don't match, remove class default from the HTML attribute.
if(document.documentElement.scrollHeight !== screen.height) {
document.documentElement.classList.remove("default");
}
CSS example:
html
{
height: 100%;
width: 100%;
}
html.default {
height: calc(100% + env(safe-area-inset-top, 0) + env(safe-area-inset-bottom, 0));
}
Found an easier solution: Add height=device-height to the viewport meta tag:
The problem is caused by the Cordova Keyboard plugin and not this plugin. Issue can be closed.
A strange behavior happens if you have your app already running. As soon as you click the mycoolapp:// URL it moves to the app but make the HTML element bigger. But if you don't have the app running and click the URL it's all fine.
The added height is exact the size of the
safe-area
properties.Tested with: