Wicket
  1. Wicket
  2. WICKET-1120

Problem closing a ModalWindow when used through an IFrame

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-rc1
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None

      Description

      I'm doing some POC testing to find out how a wicket application could be used through an IFrame and noticed that closing of a ModalWindow fails.

      My setup:

      Application A:
      -a dummy html page that has an IFrame
      -the contents of the IFrame is requested from Application B
      <iframe src="http://localhost:8080/mywicketapp/app/" width="100%" height="500"></iframe>

      Application B:
      -a Wicket application that uses a ModalWindow
      -deployed to tomcat: http://localhost:8080/mywicketapp/

      Problem:
      The ModalWindow is not closed when OK ( or Cancel ) button is clicked when Application B is used throug IFrame of Application A.
      OK button performs the actual action (in my case deletes an item from a list) but is not closed after the execution of the action.

      Closing of the ModalWindow works normally when Application B is not used through an IFrame.

      Reproducing the problem:

      You can test this by creating a html page with this source:

      <html>
      <body>
      <iframe src="http://www.wicket-library.com/wicket-examples/ajax/modal-window.1" width="100%" height="100%"></iframe>
      </body>
      </html>

      And then open "Show modal dialog with panel" and try to close the dialog.

        Activity

        Hide
        Johan Compagner added a comment -

        matej, must this be fixed for 1.3?

        Show
        Johan Compagner added a comment - matej, must this be fixed for 1.3?
        Hide
        Matej Knopp added a comment -

        No. And I definitely don't see any reason for this to be a blocker.

        Show
        Matej Knopp added a comment - No. And I definitely don't see any reason for this to be a blocker.
        Hide
        Ryan Donahue added a comment - - edited

        I have also seen this problem in the Facebook version of our app which is rendered inside a Facebook IFrame (this video shows the problem http://www.utipu.com/app/tip/id/537/ ) . Any links or buttons that I add to the modal window work fine and close the window as expected, but the "X" in the top right corner does not work. I have added a "Close this window" link to all of our modal windows for now, but this obviously clutters the window and could confuse users when trying to decide how to close the window.

        Show
        Ryan Donahue added a comment - - edited I have also seen this problem in the Facebook version of our app which is rendered inside a Facebook IFrame (this video shows the problem http://www.utipu.com/app/tip/id/537/ ) . Any links or buttons that I add to the modal window work fine and close the window as expected, but the "X" in the top right corner does not work. I have added a "Close this window" link to all of our modal windows for now, but this obviously clutters the window and could confuse users when trying to decide how to close the window.
        Hide
        Pas Filip added a comment -

        I vote for this being included in the 1.3.4 release if posssible at all. It is in our case a major showstopper.
        It has caused us a lot of frustration to find the true root cause of this problem.
        If you decide not to update this for a 1.3 release the least you guys can do is clearly document that the modal window is not
        working when used inside an iframe.
        In our application we tried using the js for the modal window to show the contents of another application (on another domain) through
        this iframe. (after aligning the domains in the document) everything works except for the behavior of the modal window being very very wrong.
        When we load a modal window thorugh js not throuh wicket and then load another modal window within a lot fails.

        Please do make this a higher priority. Also if you pass to java 5 for wicket 1.4 i'm all in favor of fixing this also in a patch release for 1.3 for those poor suckers like us still stuck on 1.4. Normally not for much long but at least another few months.

        Show
        Pas Filip added a comment - I vote for this being included in the 1.3.4 release if posssible at all. It is in our case a major showstopper. It has caused us a lot of frustration to find the true root cause of this problem. If you decide not to update this for a 1.3 release the least you guys can do is clearly document that the modal window is not working when used inside an iframe. In our application we tried using the js for the modal window to show the contents of another application (on another domain) through this iframe. (after aligning the domains in the document) everything works except for the behavior of the modal window being very very wrong. When we load a modal window thorugh js not throuh wicket and then load another modal window within a lot fails. Please do make this a higher priority. Also if you pass to java 5 for wicket 1.4 i'm all in favor of fixing this also in a patch release for 1.3 for those poor suckers like us still stuck on 1.4. Normally not for much long but at least another few months.
        Hide
        Martijn Dashorst added a comment -

        Moved to next milestone release.

        Show
        Martijn Dashorst added a comment - Moved to next milestone release.
        Hide
        Matej Knopp added a comment -

        commited fix for 1.3 branch and trunk

        Show
        Matej Knopp added a comment - commited fix for 1.3 branch and trunk

          People

          • Assignee:
            Matej Knopp
            Reporter:
            Deepak Mahavishnu
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development