[ 
https://issues.apache.org/jira/browse/CB-5659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13850167#comment-13850167
 ] 

Shazron Abdullah commented on CB-5659:
--------------------------------------

What would really help is attaching an index.html with the test case included, 
so we can be on the same page in testing, and verifying a fix.

> 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
>              Labels: newbie
>
> 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.4#6159)

Reply via email to