0 Replies Latest reply on Oct 27, 2016 11:22 AM by bigreni

    Disabling hydration breaks iframe

    bigreni

      I have a basic app which embeds the w3schools example in an iframe. When I have hydration enabled the app works fine on my Nexus phone. When disabled, it just shows a white screen. Below is my index.html, config.xml and script.js code. Has anyone else encountered this problem?

       

      index.html

      <!DOCTYPE html>

      <html>

      <head>

      <meta charset="utf-8" />

      <meta name="format-detection" content="telephone=no" />

      <meta name="viewport"

      content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />

      <title>Test</title>

       

      </head>

      <body onload="onLoad()">

      <script type="text/javascript" src="cordova.js"></script>

      <script type="text/javascript" src="js/script.js"></script>

      <div id="fullpage" data-role="page">

         <div data-role="content">

         <iframe style="width: 100%; height:600px; border: none" src="http://www.w3schools.com/" height="240" width="320"></iframe>

         </div>

      </div>

         <div>

         </div>

       

      </body>

      </html>

       

      script.js

      function onLoad() {

         if ((/(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent))) {

        document.addEventListener('deviceready', initApp, false);

         } else {

        initApp();

         }

         }

       

      Config.xml

      <?xml version='1.0' encoding='utf-8'?>

      <widget

      id="com.test.app"

      version="1.0.1"

      versionCode = "65"

      xmlns="http://www.w3.org/ns/widgets"

      xmlns:gap="http://phonegap.com/ns/1.0"

      >

         <name>iframe test</name>

         <description>

        iframe.

         </description>

         <author email="support@phonegap.com" href="http://phonegap.com">

        PhoneGap Team

         </author>

         <content src="index.html" />

         <preference name="android-build-tool" value="gradle" />

         <gap:plugin name="cordova-plugin-admobpro" source="npm" />

         <preference name="permissions" value="none" />

         <preference name="orientation" value="portrait" />

         <preference name="target-device" value="universal" />

         <preference name="fullscreen" value="true" />

         <preference name="webviewbounce" value="true" />

         <preference name="prerendered-icon" value="true" />

         <preference name="stay-in-webview" value="false" />

         <preference name="ios-statusbarstyle" value="black-opaque" />

         <preference name="detect-data-types" value="true" />

         <preference name="exit-on-suspend" value="false" />

         <preference name="show-splash-screen-spinner" value="true" />

         <preference name="auto-hide-splash-screen" value="true" />

         <preference name="disable-cursor" value="false" />

         <preference name="android-minSdkVersion" value="14" />

         <preference name="android-installLocation" value="auto" />

         <gap:plugin name="org.apache.cordova.device" />

         <gap:plugin name="org.apache.cordova.device-motion" />

         <gap:plugin name="org.apache.cordova.geolocation"/>

         <icon src="icon.png" gap:role="default" />

         <icon gap:platform="android" gap:qualifier="ldpi" src="res/icon/android/Icon-36.png" />

         <icon gap:platform="android" gap:qualifier="mdpi" src="res/icon/android/Icon-48.png" />

         <icon gap:platform="android" gap:qualifier="hdpi" src="res/icon/android/Icon-72.png" />

         <icon gap:platform="android" gap:qualifier="xhdpi" src="res/icon/android/Icon-96.png" />

         <icon gap:platform="blackberry" src="res/icon/blackberry/icon-80.png" />

         <icon gap:platform="blackberry" gap:state="hover" src="res/icon/blackberry/icon-80.png" />

         <icon gap:platform="ios" height="57" src="res/icon/ios/icon-57.png" width="57" />

         <icon gap:platform="ios" height="72" src="res/icon/ios/icon-72.png" width="72" />

         <icon gap:platform="ios" height="114" src="res/icon/ios/icon-57-2x.png" width="114" />

         <icon gap:platform="ios" height="144" src="res/icon/ios/icon-72-2x.png" width="144" />

         <icon gap:platform="webos" src="res/icon/webos/icon-64.png" />

         <icon gap:platform="winphone" src="res/icon/windows-phone/icon-48.png" />

         <icon gap:platform="winphone" gap:role="background" src="res/icon/windows-phone/icon-173-tile.png" />

         <gap:splash gap:platform="android" gap:qualifier="port-ldpi" src="res/screen/android/screen-ldpi-portrait.png" />

         <gap:splash gap:platform="android" gap:qualifier="port-mdpi" src="res/screen/android/screen-mdpi-portrait.png" />

         <gap:splash gap:platform="android" gap:qualifier="port-hdpi" src="res/screen/android/screen-hdpi-portrait.png" />

         <gap:splash gap:platform="android" gap:qualifier="port-xhdpi" src="res/screen/android/screen-xhdpi-portrait.png" />

         <gap:splash gap:platform="blackberry" src="res/screen/blackberry/screen-225.png" />

         <gap:splash gap:platform="ios" height="480" src="res/screen/ios/screen-iphone-portrait.png" width="320" />

         <gap:splash gap:platform="ios" height="960" src="res/screen/ios/screen-iphone-portrait-2x.png" width="640" />

         <gap:splash gap:platform="ios" height="1136" src="res/screen/ios/screen-iphone-portrait-568h-2x.png" width="640" />

         <gap:splash gap:platform="ios" height="1024" src="res/screen/ios/screen-ipad-portrait.png" width="768" />

         <gap:splash gap:platform="ios" height="768" src="res/screen/ios/screen-ipad-landscape.png" width="1024" />

         <gap:splash gap:platform="winphone" src="res/screen/windows-phone/screen-portrait.jpg" />

         <access origin="*" />

      </widget>