[ 
https://issues.apache.org/jira/browse/WICKET-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836625#action_12836625
 ] 

Michał Letyński commented on WICKET-2755:
-----------------------------------------

Proposed solution:
In modal.js instead of
if (Wicket.Window.unloadConfirmation == true)  
use 
(this.settings.unloadConfirmation == true) 

In ModalWindow in getWindowOpenJavascript() method
add
appendAssignment(buffer, "settings.unloadConfirmation ", 
getUnloadConfirmation());

getUnloadConfirmation() simple getter, true for default

> unloadConfirmation should be configurable from ModalWindow
> ----------------------------------------------------------
>
>                 Key: WICKET-2755
>                 URL: https://issues.apache.org/jira/browse/WICKET-2755
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.4.6
>            Reporter: Michał Letyński
>
> Hi.
> After refreshing page with modal window on it i get alert:
> "Reloading this page will cause the modal window to disappear."
> Its from modal.js
>        if (Wicket.Window.unloadConfirmation == true) {
>             // new beforeunload handler - ask user before reloading window
>             window.onbeforeunload = function() {           
>                 return "Reloading this page will cause the modal window to 
> disappear.";
>             }               
>         }
> unloadConfirmation is always true.
> Can you make it configurable ? For e.g throught setting's in 
> ModalWindow.class ? Because now i need to override onbeforeunload  withy 
> empty body function

-- 
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