{"action":"created","issue":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2432","repository_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps","labels_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2432/labels{/name}","comments_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2432/comments","events_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2432/events","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/2432","id":362735932,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MzcxNDIx","number":2432,"title":"Feature test for viewport-fit=cover","user":{"login":"chadevans","id":33132833,"node_id":"MDQ6VXNlcjMzMTMyODMz","avatar_url":"https://avatars2.githubusercontent.com/u/33132833?v=4","gravatar_id":"","url":"https://api.github.com/users/chadevans","html_url":"https://github.com/chadevans","followers_url":"https://api.github.com/users/chadevans/followers","following_url":"https://api.github.com/users/chadevans/following{/other_user}","gists_url":"https://api.github.com/users/chadevans/gists{/gist_id}","starred_url":"https://api.github.com/users/chadevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadevans/subscriptions","organizations_url":"https://api.github.com/users/chadevans/orgs","repos_url":"https://api.github.com/users/chadevans/repos","events_url":"https://api.github.com/users/chadevans/events{/privacy}","received_events_url":"https://api.github.com/users/chadevans/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-21T18:54:01Z","updated_at":"2018-10-16T23:19:57Z","closed_at":"2018-09-21T19:15:23Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/pulls/2432","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/2432","diff_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/2432.diff","patch_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/2432.patch"},"body":"Current functionality checks user agent for iOS 11 or higher. If `true`, adds `viewport-fit=cover` to the `viewport` meta tag. This allows use of safe areas, for example, the \"notch\" at the top of iPhone X.\r\n\r\nGoogle now [supports this feature](https://blog.chromium.org/2018/08/chrome-69-beta-av1-video-decoder-css.html) in Chrome 69, opening the door for Android phones to use Display Cutouts.\r\n\r\nI propose this plugin should test the browser for support of the CSS variable `env()` which delivers the pixel value of safe spaces, like this:\r\n\r\n#box {\r\n  margin-top: env(safe-area-inset-top);\r\n  margin-left: env(safe-area-inset-left);\r\n  margin-bottom: env(safe-area-inset-bottom);\r\n  margin-right: env(safe-area-inset-right);\r\n}\r\n\r\nThe included test creates a div with a `margin-top` set to `-99px` followed by `margin-top:env(safe-area-inset-top)`.\r\n\r\nIf the browser does not support `env()`, then `margin-top:env(safe-area-inset-top)` is ignored and the calculated value remains `-99px`. In this case, `viewport-fit=cover` is not added to the `viewport` meta tag.\r\n\r\nIf the browser does support `env()`, the calculated value will be something other than `-99px`, either `0px` or a specific value associated with that phone. In this case, `viewport-fit=cover` is added to the `viewport` meta tag, allowing use of `env()` for display cutouts."},"comment":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/comments/430434707","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/2432#issuecomment-430434707","issue_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2432","id":430434707,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDQzNDcwNw==","user":{"login":"chadevans","id":33132833,"node_id":"MDQ6VXNlcjMzMTMyODMz","avatar_url":"https://avatars2.githubusercontent.com/u/33132833?v=4","gravatar_id":"","url":"https://api.github.com/users/chadevans","html_url":"https://github.com/chadevans","followers_url":"https://api.github.com/users/chadevans/followers","following_url":"https://api.github.com/users/chadevans/following{/other_user}","gists_url":"https://api.github.com/users/chadevans/gists{/gist_id}","starred_url":"https://api.github.com/users/chadevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadevans/subscriptions","organizations_url":"https://api.github.com/users/chadevans/orgs","repos_url":"https://api.github.com/users/chadevans/repos","events_url":"https://api.github.com/users/chadevans/events{/privacy}","received_events_url":"https://api.github.com/users/chadevans/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T23:19:57Z","updated_at":"2018-10-16T23:19:57Z","author_association":"CONTRIBUTOR","body":"@cpamp if you are in a cordova project, not Ionic, could you check the DOM and see if the script loads in the `<head>` which is before `<body>`."}}
{"actor":{"display_login":"chadevans"}}