You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jacob Weber (JIRA)" <ji...@apache.org> on 2014/01/10 19:44:50 UTC

[jira] [Created] (CB-5768) Can't load new URL in current InAppBrowser

Jacob Weber created CB-5768:
-------------------------------

             Summary: Can't load new URL in current InAppBrowser
                 Key: CB-5768
                 URL: https://issues.apache.org/jira/browse/CB-5768
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS, Plugin InAppBrowser
    Affects Versions: 3.3.0
            Reporter: Jacob Weber


If I open the InAppBrowser, and then load a new URL in it, there are problems.

I've tried two different approaches. Both start with a new project, created using the CLI. I'm running them in Xcode, using the iPhone emulator, and putting one of the following in the onDeviceReady function of js/index.js:

1. This causes the screen to go black:
{code:javascript}window.open('http://www.google.com', '_blank');
window.open('http://www.apple.com', '_blank');{code}

This appears in the Xcode console:
{code}2014-01-10 10:41:09.395 CordovaTest[99490:70b] Warning: Attempt to present <UINavigationController: 0xbac11e0> on <MainViewController: 0xb878370> while a presentation is in progress!
2014-01-10 10:41:09.408 CordovaTest[99490:70b] webView:didFailLoadWithError - The operation couldn’t be completed. (NSURLErrorDomain error -999.){code}

2. This seems to work at first; it loads the second URL.
{code:javascript}window.open('http://www.google.com', '_blank');
setTimeout(function() {
	window.open('http://www.apple.com', '_blank');
}, 1000);{code}
But when I click the Close button, the window doesn't close. Then when I click it again, I get a crash. This appears in the Xcode console:
{code}CordovaTest[99364:70b] Warning: Attempt to present <UINavigationController: 0xba3d090> on <MainViewController: 0xb8596d0> whose view is not in the window hierarchy!{code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)