After adding an inAppBrowser, I noticed that when inside the browser,
Expectation: If I click the hardware back button, a confirmation popup should appear with options to leave the page or cancel.
Actual: Instead of showing the confirmation popup, it immediately triggers the Exit event and closes the inAppBrowser.
In my x.ts file:
this.inAppBrowser.on('exit').subscribe(
() => {
this.screenOrientation.lock(this.screenOrientation.ORIENTATIONS.PORTRAIT);
console.log('orientation after browser close: ' + this.screenOrientation.type);
}
);
I'm struggling with finding a way or workaround to detect the backbutton click instead of triggering the exit event. Any suggestions?