[ 
https://issues.apache.org/jira/browse/WICKET-1003?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534085
 ] 

Steven Katz commented on WICKET-1003:
-------------------------------------

I have devised a solution to the problem I am seeing, but have no idea if it is 
appropriate.  I have tested it on both firefox2 and IE7.  In ModalWindow the 
JavaScript for the close action is replaced with what is given bellow.  
Basically, we store from which root we successfully got the value for win and 
use that to set the function against.

        return "var win;var par\n" //
        + "try {\n"
        + "     alert(window.parent);win = 
window.parent.Wicket.Window;par=window.parent\n"
        + "} catch (ignore) {\n"
        + " alert('first exception');}\n"
        + "if (typeof(win) == \"undefined\" || typeof(win.current) == 
\"undefined\") {\n"
        + "  try {\n"
        + "     alert('second try');win = window.Wicket.Window;par=window\n"
        + "  } catch (ignore) {\n"
        + "  alert('second exception');}\n"
        + "}\n"
        + "if (typeof(win) != \"undefined\" && typeof(win.current) != 
\"undefined\") {\n"
        + "     par.setTimeout(function() {\n"
        + "             win.current.close();\n"
        + "     }, 0);\n" + "}";

> Modal Window Does Not Close When Using IndicatingAjaxButton
> -----------------------------------------------------------
>
>                 Key: WICKET-1003
>                 URL: https://issues.apache.org/jira/browse/WICKET-1003
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 1.3.0-beta4
>         Environment: Ubuntu, Jetty, Eclipse
>            Reporter: Carlo M. Camerino
>         Attachments: Modal.png, quickstart-closeDoesntWork.zip
>
>
> I have  a panel in my modal window. I have a button in my panel that closes 
> the modalwindow.
> If I use an indicatingajaxbutton for that button, the modalwindow does not 
> close properly.
> However if i use an ajaxlink, things go smoothly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to