longzheng / mypal-ionic

Mobile app to see Myki account details for iOS & Android
MIT License
68 stars 13 forks source link

iOS 11 status bar bug #59

Closed longzheng closed 7 years ago

longzheng commented 7 years ago

viewport-fit: cover doesn't have any effect because Google Maps cordova plugin is overwriting meta viewport on load

plugins/cordova-plugin-googlemaps/www/googlemaps-cdv-plugin.js

/*****************************************************************************
 * To prevent strange things happen,
 * disable the changing of viewport zoom level by double clicking.
 * This code has to run before the device ready event.
 *****************************************************************************/
(function() {
    var viewportTag = null;
    var metaTags = document.getElementsByTagName('meta');
    for (var i = 0; i < metaTags.length; i++) {
        if (metaTags[i].getAttribute('name') === "viewport") {
            viewportTag = metaTags[i];
            break;
        }
    }
    if (!viewportTag) {
        viewportTag = document.createElement("meta");
        viewportTag.setAttribute('name', 'viewport');
    }
    viewportTag.setAttribute('content', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no');
})();
longzheng commented 7 years ago

https://github.com/longzheng/mypal-ionic/commit/276425e513188637e9fabbd79d8e64ea403bcebc https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/1630 https://github.com/mapsplugin/cordova-plugin-googlemaps/pull/1645