[ 
https://issues.apache.org/jira/browse/WICKET-2755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-2755.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

this setting is global for all modal windows and so tweaking it from the 
modalwindow class doesnt really make sense. a cleaner solution then overriding 
the method with an empty function is to use iheadercontributor and output a bit 
of js into the page "Wicket.Window.unloadConfirmation = false;"

> 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
>            Assignee: Igor Vaynberg
>
> 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