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

Can't close and then immediately re-open InAppBrowser

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.3.0
    • Fix Version/s: None
    • Labels:
    • Environment:

      iOS, Android

      Description

      When you close an InAppBrowser using the close() method, then try to open a new one right away, the new one doesn't appear.

      To reproduce:

      • Create a new project using the CLI, and run it in Xcode.
      • Debug the web view in Safari.
      • Run in the console:
        window.x = window.open('http://www.google.com', '_blank');
      • Try running any of the following, to close and then re-open the windiw:
        • window.x.close();
          window.x = window.open('http://www.apple.com', '_blank');
        • window.x.addEventListener('exit', function() {
            window.x = window.open('http://www.apple.com', '_blank');
          });
          window.x.close();
        • window.x.close();
          setTimeout(function() {
            window.x = window.open('http://www.apple.com', '_blank');
          }, 1);

      Using the last method with a timeout of 1000 works for me, but this seems unreliable.

      I'm seeing the same problem on Android, although I haven't tried debugging it.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jweber Jacob Weber
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: