cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cody Redmond (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-5659) inappbrowser/plugins fail with no exception if iframe.src is set after the location.hash is changed
Date Mon, 16 Dec 2013 21:42:07 GMT

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

Cody Redmond updated CB-5659:
-----------------------------

    Description: 
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:
$body = $("body");
$body.empty();
$iframe = $("<iframe />");
$iframe.appendTo($body);
$iframe.attr('src', 'http://apache.org');

And the result is as expected -- iframe displays with content.

2) Execute 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); });

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:

window.location.hash = 'test';

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?

  was:
tldr; Inappbrowser dies -- but only if both the hash is changed and then an iframe source
is loaded.  Seems to kill all 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 of course this exact code requires
jquery, so.

1) Execute code:
$body = $("body");
$body.empty();
$iframe = $("<iframe />");
$iframe.appendTo($body);
$iframe.attr('src', 'http://apache.org');

And the result is as expected -- iframe displays with content.

2) Execute 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); });

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:

window.location.hash = 'test';

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?


> 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:
> $body = $("body");
> $body.empty();
> $iframe = $("<iframe />");
> $iframe.appendTo($body);
> $iframe.attr('src', 'http://apache.org');
> And the result is as expected -- iframe displays with content.
> 2) Execute 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); });
> 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:
> window.location.hash = 'test';
> 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)

Mime
View raw message