Wicket
  1. Wicket
  2. WICKET-431

Modal window can not be closed after session timeout

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.5, 1.3.0-beta1
    • Fix Version/s: 1.3.5
    • Component/s: wicket-extensions
    • Labels:
      None
    • Environment:
      tested on Linux FF / Windows FF

      Description

      After session timeout, clicking on the close button (X) generates a warning message:

      'Are you sure you want to .... Reloading this page will cause the modal window to disappear....'
      --> Maybe something about session timeout might be more meaningful?

      If you click 'Cancel' you are stuck with an unclosable modal window, the previous message won't be shown again.

        Activity

        Hide
        Alastair Maw added a comment -

        This is probably one for you, Matej.

        This isn't going to get fixed in the 1.2.x branch unless you jump up and down a lot with a good use case - I can't imagine your users see this often.

        Show
        Alastair Maw added a comment - This is probably one for you, Matej. This isn't going to get fixed in the 1.2.x branch unless you jump up and down a lot with a good use case - I can't imagine your users see this often.
        Hide
        Matej Knopp added a comment -

        I don't see how i can fix it. If you click ok, the modal dialog will disappear. Also you can disable the entire message if you want. I'm postponing this with lowering the priority, as this certainly isn't a major one.

        Show
        Matej Knopp added a comment - I don't see how i can fix it. If you click ok, the modal dialog will disappear. Also you can disable the entire message if you want. I'm postponing this with lowering the priority, as this certainly isn't a major one.
        Hide
        Eelco Hillenius added a comment -

        Assigned version (beta 4)

        Show
        Eelco Hillenius added a comment - Assigned version (beta 4)
        Hide
        Matej Knopp added a comment -

        set Wicket.Window.unloadConfirmation = false; to disable the confirmation dialog. That way after clicking close button page expired error should be displayed.

        Show
        Matej Knopp added a comment - set Wicket.Window.unloadConfirmation = false; to disable the confirmation dialog. That way after clicking close button page expired error should be displayed.
        Hide
        Rastislav Vojtko added a comment -

        Matej, setting:
        Wicket.Window.unloadConfirmation = false;

        does not help because the false case is not handled in the modal.js. To be more specific, instead of:

        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."; }
        }

        as it is now, should be:

        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."; }

        } else {
        window.onbeforeunload = function() {}
        }

        because only and if only the window.onbeforeunload function doesn't return anything at all, the browser confirmation dialog will not be shown.

        Show
        Rastislav Vojtko added a comment - Matej, setting: Wicket.Window.unloadConfirmation = false; does not help because the false case is not handled in the modal.js. To be more specific, instead of: 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."; } } as it is now, should be: 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."; } } else { window.onbeforeunload = function() {} } because only and if only the window.onbeforeunload function doesn't return anything at all, the browser confirmation dialog will not be shown.

          People

          • Assignee:
            Matej Knopp
            Reporter:
            Francis De Brabandere
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development