alesrosina opened a new issue #649: exit event is handled in ios diferently 
than in android
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/649
 
 
   # Bug Report
   
   ## Problem
   
   Event `exit` is triggered in Android every time browser is closed - so if it 
is closed with `browser.close()` or if it is closed via "Done" button in footer.
   
   In iOS this event is triggered ONLY when a user clicks "Done" button, but it 
does not trigger when `browser.close()` is called.
   
   ### What is expected to happen?
   
   Both platforms should handle it the same way - in my opinion, Android way of 
implementing it is the correct one.
   
   ### What does actually happen?
   
   Already described above.
   
   
   ### Command or Code
   ```
   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', { usewkwebview: 'yes' });
   
       browser.on('loadstop').subscribe(async event => {
         //this  will not trigger exit event on ios, while on android it will
         browser.close(); 
       });
   
       browser.on('exit').subscribe(event => {
         console.log("exit");
       });
     }
   }
   ```
   
   
   
   ### Environment, Platform, Device
   Android 9, iOS 13
   
   
   
   ### Version information
   
   ```
   "cordova": "^9.0.0",
   "cordova-android": "^8.1.0",
   "cordova-ios": "^5.1.1",
   "cordova-plugin-inappbrowser": "^3.2.0",
   ```
   
   <!-- 
   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.
   -->
   
   
   
   ## Checklist
   
   - [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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to