'Ionic inappbrowser not working after coming back from external link

I have and ionic project with ios, android and browser. The problem is in IOS and Android: from tab1.page.html, after opening a login page (which in an external server) in the iOS browser without any problem, that external page has a link back to the ionic project(to map.component.html) which opens alright but buttons in the page which should open the browser again will not work, not error no nothing, just there is no action.

If I open map.component.html directly from inside the ionic project the button work normally and the browser is open. It's only where I come back from an external page when button do nothing.

Any help would be much appreciate it, it's been days banging my head against the wall...

tab1.page.html

<div>
<a href="#" routerLink="/login" routerDirection="root"><ion-ripple-effect></ion-ripple-effect><img src="../../assets/images/top-btn-reserve.png" class="drop-shadow" alt="login"></a>
</div>

login.page.ts

private  loginUrl = 'https://test.blabla.reservation/index';
    constructor(
        private inAppBrowser: InAppBrowser
    ) {
    }

    ngOnInit() {
        const browser = this.inAppBrowser.create(this.loginUrl, '_self', {location: 'no', zoom: 'no', toolbar: 'no'});
    }

app-routing.module

{ path: 'guidance', loadChildren: './guidance/tab2.module#Tab2PageModule',pathMatch: 'full'},

map.component.ts

openMapApp() {
        console.log("In openMAPPPP");
        const browser = this.inAppBrowser.create('https://www.google.com', '_system', {location: 'yes', zoom: 'no', toolbar: 'no'});
}

map.component.html

<ion-button  id="navigation_icon" class="navigation_icon" shape="round" size="default" color="light" (click)="openMapApp()">GoogleMapsで見る</ion-button>


Ionic:

   Ionic CLI                     : 6.18.1 (/Users/allround/.nvm/versions/node/v12.22.6/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 4.11.5
   @angular-devkit/build-angular : 0.13.10
   @angular-devkit/schematics    : 8.3.19
   @angular/cli                  : 7.3.10
   @ionic/angular-toolkit        : 1.5.1

Capacitor:

   Capacitor CLI      : 1.5.1
   @capacitor/android : not installed
   @capacitor/core    : 1.5.1
   @capacitor/ios     : 1.5.2

Cordova:

   Cordova CLI       : 10.0.0 ([email protected])
   Cordova Platforms : browser 6.0.0, ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 12 other plugins)


Solution 1:[1]

Call back the URL after open in external browser.

Ex

this.iabRef = this.iab.create("https://stackoverflow.com/", "_blank", "beforeload=yes,location=no");
                
this.iab.create(event.url, "_system");
this.iabRef._loadAfterBeforeload(event.url);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Syscall