Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10855

cordova-plugin-dialogs doesn't work on cordova-plugin-inappbrowser exit event

    XMLWordPrintableJSON

Details

    Description

      If you try to use the dialogs plugin on the inAppBrowser exit event you'll get a warning message

      Warning: Attempt to present <UIAlertController: 0x14e9b0e40> on <CDVInAppBrowserNavigationController: 0x14d878a00> whose view is not in the window hierarchy!

      and won't be displayed.

      Sample code:

      var ref = cordova.InAppBrowser.open('http://apache.org', '_blank', 'location=yes');
      var myCallback = function(event) { 
          navigator.notification.alert("message", null, "MyAppTitle", 'OK'  );
      }
      ref.addEventListener('exit', myCallback);
      

      The exit event should be called once the InAppBrowser window is completely dismissed, not before

      Attachments

        Activity

          People

            jcesarmobile jcesarmobile
            jcesarmobile jcesarmobile
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: