You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/04/01 13:31:39 UTC

[GitHub] [cordova-plugin-inappbrowser] KuschL commented on issue #649: exit event is handled in ios diferently than in android

KuschL commented on issue #649: exit event is handled in ios diferently than in android
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/649#issuecomment-607250991
 
 
   I've got almost the same (if not the same) issue. The 'exit' event is triggered correctly on iOS if the browser is **not** hidden.
   
   So the code above will work as intended. The code below doesn't close the browser.
   
   ```typescript
   import { Injectable } from '@angular/core'
   import { InAppBrowser } from '@ionic-native/in-app-browser/ngx'
   
   @Injectable()
   export class Demo {
   
     constructor(private iab: InAppBrowser) {}
   
     public runBrowser(url) {
       
       const browser = this.iab.create(url, '_blank', { hidden: 'yes' })
   
       browser.on('loadstop').subscribe(async event => {
         // browser is still running in background
         browser.close();
       })
   
       browser.on('exit').subscribe(event => {
         console.log("exit")
       })
     }
   }
   ```
   
   I'm using Ionic with latest versions:
   ```
   Ionic:
   
      Ionic CLI                     : 6.4.0 (~/.nvm/versions/node/v13.2.0/lib/node_modules/@ionic/cli)
      Ionic Framework               : @ionic/angular 5.0.7
      @angular-devkit/build-angular : 0.901.0
      @angular-devkit/schematics    : 9.1.0
      @angular/cli                  : 9.1.0
      @ionic/angular-toolkit        : 2.2.0
   
   Cordova:
   
      Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
      Cordova Platforms : android 8.1.0, ios 5.1.1
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 21 other plugins)
   
   Utility:
   
      cordova-res : 0.11.0
      native-run  : 0.3.0
   
   System:
   
      ios-deploy : 1.9.4
      ios-sim    : 8.0.2
      NodeJS     : v13.2.0 (~/.nvm/versions/node/v13.2.0/bin/node)
      npm        : 6.14.4
      OS         : macOS Catalina
      Xcode      : Xcode 11.4 Build version 11E146
   ```

----------------------------------------------------------------
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


With regards,
Apache Git Services

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