How to add confirmation popup on back button inside inAppBrowser in ionic

I have added an inAppBrowser and now after going inside the browser,

Expectation : if i click the hardware back button, i want to show a confirmation popup with option leave page and Cancel

Actual : It is calling the Exit event and closing the inAppBrowser

in my x.ts file :

    () => {
      console.log('orientation after browser close: ' + this.screenOrientation.type);

My issue is that, do we have any way or workaround to detect backbutton click instead of exit ?

Read more here:

Content Attribution

This content was originally published by Sourav Singh at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: