Cody Redmond created CB-5659:
--------------------------------
Summary: 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
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?
--
This message was sent by Atlassian JIRA
(v6.1.4#6159)