You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/08/26 12:53:19 UTC

[GitHub] [cordova-ios] app-xerintel opened a new issue #974: Iframe elements do not work properly when the application launches first time

app-xerintel opened a new issue #974:
URL: https://github.com/apache/cordova-ios/issues/974


   # Bug Report
   
   Iframe elements do not work properly when the application launches first time
   
   ## Problem
   
   We have several applications made with Ionic and with your platform, cordova-ios, which include iframe tags. 
   
   In Android they always work correctly, but in iOS it happens that when the application is run for the first time, several actions of the embedded web page (such as adding products to the cart, filling out forms, etc) are not executed correctly.
   
   However, when you close the application and open it again, these actions do work correctly. 
   
   After investigating the problem ourselves, we have checked in the Safari inspector that the iframe cookies are not set when the application is first loaded. However, when closing the application and reopening it do appear, so we believe that this could be the origin of the problem (correct us if we are wrong).
   
   Can you give us any idea, solution or alternative to fix this error?
   
   ### What is expected to happen?
   
   Iframe elements always working on iOS devices
   
   ### What does actually happen?
   
   Several actions of the embedded web page (such as adding products to the cart, filling out forms, etc) are not executed correctly.
   
   However, when you close the application and open it again, these actions do work correctly. 
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   Angular code (.ts file):
   
   ```
   import { Component, OnInit } from '@angular/core';
   import { environment } from 'src/environments/environment';
   import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
   import { UtilitiesService } from '../../services/utilities.service';
   import { Storage } from '@ionic/storage';
   
   @Component({
     selector: 'app-tab1',
     templateUrl: 'tab1.page.html',
     styleUrls: ['tab1.page.scss']
   })
   export class Tab1Page {
   
     public urlFrame: SafeResourceUrl;
     public loading: boolean = true;
   
     constructor(private sanitizer: DomSanitizer,
       private utilities: UtilitiesService, private storage: Storage) {
     }
   
     public ionViewDidEnter(): void {
       this.utilities.showLoading();
       this.loading = true;
       this.storage.get('idioma').then(idioma => {
         this.urlFrame = this.sanitizer.bypassSecurityTrustResourceUrl(environment.iframeUrl + 'locale/' + idioma + '/home');
       })
   
   
     }
   
     public dismissLoading() {
       this.loading = false;
       this.utilities.dismissLoading();
     }
   
   }
   ```
   
   .html file:
   
   ```
   <ion-content>
     <div class="scroll" [hidden]="loading">
       <iframe #iframeCheckout id="iframe" class="web-page" name="events-page" [src]="urlFrame" frameborder="0"
         allowfullscreen sandbox="allow-same-origin allow-scripts allow-forms" (load)="dismissLoading()"></iframe>
     </div>
   </ion-content>
   ```
   
   .scss file:
   
   ```
   .scroll {
     height: 100%;
   }
   .web-page {
     width: 100%;
     height: 100%;
     background-color: transparent;
   }
   ```
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   Environment: macOS Catalina 10.15.4
   Platform: iOS 13, iOS 13.+
   Device: iOS devices
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   Cordova CLI: `9.0.0 (cordova-lib@9.0.1)`
   Cordova plugins: 
   ```
   cordova-plugin-device 2.0.2 "Device"
   cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
   cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
   cordova-plugin-splashscreen 5.0.2 "Splashscreen"
   cordova-plugin-statusbar 2.4.2 "StatusBar"
   cordova-plugin-whitelist 1.3.4 "Whitelist"
   phonegap-plugin-push 2.3.0 "PushPlugin"
   ```
   Ionic Framework: 4.7.1
   Ionic CLI: 6.4.0
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [X] I searched for existing GitHub issues
   - [X] I updated all Cordova tooling to most recent version
   - [X] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] breautek commented on issue #974: Iframe elements do not work properly when the application launches first time

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #974:
URL: https://github.com/apache/cordova-ios/issues/974#issuecomment-682558388


   Related to: https://github.com/apache/cordova-ios/issues/944 (Cookies issue)
   
   A potential workaround is documented at https://github.com/apache/cordova-ios/issues/944#issuecomment-660035130


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] ugale-deepak3010 commented on issue #974: Iframe elements do not work properly when the application launches first time

Posted by GitBox <gi...@apache.org>.
ugale-deepak3010 commented on issue #974:
URL: https://github.com/apache/cordova-ios/issues/974#issuecomment-784851489


   I am used iframe inside other url link that work good
   But I embed pdf url that not work only white block display
   Than I tried google doc viewer then and my url put.
   But later happen very wrong 
   Sometime there show and sometimes not
   😥😥😥


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org