Details
Description
Hi,
When using the post via iframe feature of Wicket (for multipart Ajax request) with Firefox, the tab title is changed to "Connecting..." and it doesn't get back to the original page title at all, even after the Ajax call returned.
The iframe is removed in the onload of the iframe ( see
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L868
) and it seems to be problematic for Firefox.
Looks like there is some literature about it here:
http://stackoverflow.com/questions/7285866/never-ending-connecting-message-after-ajax-form-submit
and using a pattern like the following should fix it:
iframe.onload = function(){
// Do work with the content of the iframeā¦
setTimeout(function()
{ iframe.parentNode.removeChild(iframe); }, 0);
}
Quickstart coming with a way to reproduce the problem:
- Launch the application using Start.java;
- Go to http://localhost:8080/ with Firefox;
- Upload a file via the Ajax submit button;
- The tab title stays as "Connecting...".
Now uncomment the resource replacement line in the WicketApplication file, restart the app and it should work correctly.
Patch using a setTimeout call coming too.