Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5222

Direct iframe removal not supported by Firefox: tab title stays as "Connecting"

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.8.0
    • 6.9.0, 7.0.0-M1
    • wicket
    • None
    • Wicket 6.8.0, Firefox 21

    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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mgrigorov Martin Tzvetanov Grigorov
            gsmet Guillaume Smet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment