[ 
https://issues.apache.org/jira/browse/CB-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Grieve resolved CB-5659.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.4.0
         Assignee: Andrew Grieve

I believe this is caused by the same thing as CB-4330, which I just submitted a 
fix for today.

Please reopen if this is still a problem on master branch, or with Cordova 3.4 
(when it gets released)

> inappbrowser/plugins fail with no exception if iframe.src is set after the 
> location.hash is changed
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CB-5659
>                 URL: https://issues.apache.org/jira/browse/CB-5659
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin InAppBrowser
>    Affects Versions: 3.2.0
>         Environment: xcode 5.02, ios 6, ios 7, simulator Version 7.0 
> (463.9.4.2)
>            Reporter: Cody Redmond
>            Assignee: Andrew Grieve
>              Labels: newbie
>             Fix For: 3.4.0
>
>
> tldr; Inappbrowser dies -- but only if both the hash is changed and then an 
> iframe source is loaded.  Seems to kill plugins.
> Wow this took a while to figure out how to reproduce.  There are five steps, 
> and it can be reproduced in the example cordova project.  Execute the JS 
> through the safari remote debugger, or include it in the app.init after 
> deviceready.  Oh and this exact code requires jquery, is that fine?
> 1) Execute code:
> {code}
> $body = $("body");
> $body.empty();
> $iframe = $("<iframe />");
> $iframe.appendTo($body);
> $iframe.attr('src', 'http://apache.org');
> {code}
> And the result is as expected -- iframe displays with content.
> 2) Execute code:
> {code}
> var ref = window.open('http://apache.org', '_blank', 'location=yes');
> ref.addEventListener('loadstart', function(evt) { alert('start: ' + evt.url); 
> });
> ref.addEventListener('loadstop', function(evt) { alert('stop: ' + evt.url); 
> });
> ref.addEventListener('exit', function(evt) { alert(evt.type); });
> {code}
> And the result is as expected -- events fire and browser pops in with content 
> as expected.  Click "Done" to dismiss the browser.
> 3) Execute code:
> {code}
> window.location.hash = 'test';
> {code}
> 4) Repeat steps 1 -- another iframe will again display as expected.
> 5) Repeat steps 2 -- but this time, no events fire and browser doesn't pop up.
> Conclusion: Inappbrowser dies if both the hash is changed and then an iframe 
> source is loaded.
> Seems to be related to:
> https://issues.apache.org/jira/browse/CB-2602
> https://issues.apache.org/jira/browse/CB-2102 (maybe?)
> What can I do to help with this?



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

Reply via email to