Closed spacesuitdiver closed 5 years ago
Please share the reproduce project files on github.
@wf9a5m75 it doesn't happen on 2.4.4 plugin version so using that for now. I'm assuming it's a regression introduced by #2432. Let me know what you think.
This is what's in our index.html
.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="
default-src * 'self' gap://ready cdvfile://* data: filesystem: blob:;
style-src 'unsafe-inline' 'self' cdvfile://* filesystem: blob:;
script-src 'self' 'unsafe-inline' 'unsafe-eval' cdvfile://* filesystem: https://fast.wistia.com https://src.litix.io"
>
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<script>
var externalUrl, externalUrlHandler;
function handleOpenURL(url) {
if (!externalUrlHandler) {
if (externalUrl) {
console.warn('Disregarding unhandled external url: ', externalUrl);
}
externalUrl = url;
} else {
externalUrlHandler(url);
}
}
function setExternalUrlHandler(f) {
externalUrlHandler = f;
if (externalUrl) {
externalUrlHandler(externalUrl);
externalUrl = null;
}
}
</script>
<link href="fonts.css" rel="stylesheet"><link href="styles.css" rel="stylesheet"></head>
<body>
<ui-view>
<div id="indexSplash">
<div class="indexLogo"></div>
<div id="indexSplashLabel">Signing in…</div>
</div>
</ui-view>
<script src="cordova.js"></script>
<script type="text/javascript" src="app.js"></script><script type="text/javascript" src="fonts.js"></script><script type="text/javascript" src="styles.js"></script>
</body>
</html>
@chadevans ping
Please create a simple project that reproduce your issue 100%, then share it on github.
Happy to help if there is a sample project.
If not that, at least the css and a screenshot of the DOM viewport meta tag.
@chadevans thanks for jumping on.
@chadevans above is the meta tags for the project. I'll see about bootstrapping a new project, I haven't in so long though. Simply setting the body tag to absolute and filling it should reproduce the issue as the Webview itself does not take up the full device dimensions.
Meta tags in chrome devtools DOM, this plugin modifies the viewport meta tag.
Nevermind you are talking iOS.. try Safari Inspector.
The change had to do with whether viewport-fit=cover is added or not to viewport meta tag. This mode respects the safe areas Apple introduced in iOS 11 and Google in Chrome 69. I don’t know why there would be a safe area at the bottom. Seeing relevant CSS would be very helpful. The bar at the bottom looks 20px or so which is height of the menu bar... that’s the only clue I have.
@chadevans building 2.4.6 again to take a look in Safari, one sec.
One more Q, did you upgrade any other plugins at the same time
@chadevans no.
11.1 only?
11.1 only?
I can load some other versions but >11.1 works fine.
Nevermind you are talking iOS.. try Safari Inspector.
2.4.4:
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, viewport-fit=cover">
2.4.6:
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
Looks like 2.4.6 removes the viewport-fit=cover
Please share the reproduce project files on github.
We're also working on sandboxing a version for additional help because we have been trying to release our app with v2 maps coming from v1 and about 10% of the time the map just renders white with no error and map ready fired just fine. Will look for the issue I mentioned this in, looked a bit and couldn't find it.
@spacesuitdiver
Thanks for the update - I've tested an app using the latest cordova-plugin-googlemaps 2.4.6.
I'm getting viewport-fit=cover
in my DOM and no issues with map. This is on iPhone 8+ w/ iOS 12, I'm downloading 11.1 and iPhone SE to more closely match your testing.
I'm using an Ionic app so there may be some differences there in how the DOM is loaded.. look forward to being able to test on your Cordova sandbox.
@chadevans this issue is for certain not an issue on 12 only < 11.2.
@spacesuitdiver We are still waiting the project that is reproduce your issue.
@spacesuitdiver ah, this piece of info helps me understand. iOS 11.1 or less.
Now I remember, 11.0 and 11.1 called what is now env()
, it was called constant()
. Working to reproduce issue on 11.1 and should be able to fix.
@spacesuitdiver We are still waiting the project that is reproduce your issue.
Me too ;)
@spacesuitdiver try changing line 69 in pluginInit.js to this:
var envTestDiv = '<div id="envTest" style="margin-top:-99px;margin-top:constant(safe-area-inset-top);margin-top:env(safe-area-inset-top);position:absolute;z-index:-1;"></div>';
(run a console log or alert to make sure your change isn't overwritten on build)
@spacesuitdiver ping
@spacesuitdiver ping
try changing line 69 in pluginInit.js to this:
var envTestDiv = '<div id="envTest" style="margin-top:-99px;margin-top:constant(safe-area-inset-top);margin-top:env(safe-area-inset-top);position:absolute;z-index:-1;"></div>';
@wf9a5m75 tested and confirmed this works. In iOS 11.1, returns 0px
instead of -99px
with the addition of margin-top:constant(safe-area-inset-top);
to the test, which is what we want. As a reminder, any value other than -99px
in this test will add viewport-fit=cover
to the viewport
meta tag.
With this fix, iOS 11 early versions work.
@chadevans Thank you for your work. @spacesuitdiver Please make sure @chadevans 's advise works for you
@chadevans @wf9a5m75 testing this again right now in my actual project, I tried testing it yesterday but wasn't sure if it was working because the default cordova project doesn't actually go the edges of the screen.
@spacesuitdiver You should share the project files on github if you ask to do something, at least reproducible project.
@wf9a5m75 yep.
@chadevans fix seems good over here, thanks!
@chadevans Thank you for working a lot.
My pleasure, thank you for the excellent plugin.
Hi all, this is actually happening across the board on iOS 12 too... I found this issue from the Ionic repo if anybody is having an issue of no clickable back buttons in the top area of the device. I believe the status bar is covering the header buttons in an Ionic app... https://github.com/ionic-team/ionic/issues/15960
Attached is a poorly drawn picture of mine when I was explaining it to a colleague.
Reverting to 2.4.4 or waiting for a new release is advisable.
@bb128b
Please try to reproduce using the multiple_maps branch.
I'm submitting a ... (check one with "x")
OS: (check one with "x")
cordova information: (run
$> cordova plugin list
)Before (2.4.0):
After (2.4.6):
Current behavior: It seems the Webview and any other native plugin is shifted up on iOS 11.1.
Expected behavior: Webview should span the proper device height.
Screen capture or video record: Before (2.4.0):
After (2.4.6):