jQuery UI Widgets Forums Dialogs and Notifications Window Preventing closing a wndow

This topic contains 7 replies, has 7 voices, and was last updated by  assembler 3 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • Preventing closing a wndow #11949

    aorlic
    Member

    Hello!

    Is there a way to prevent a window close, once caught the “closed” event?

    I would like to intercept this event with a famous “Are you sure?” message and give the user possibility to get back to the window.

    Thank you,

    Aleks.

    Preventing closing a wndow #11956

    Peter Stoev
    Keymaster

    Hi Aleks,

    We will consider adding ‘closing’ event with option to cancel it in a future version. We will create a work item about your feature request.

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Preventing closing a wndow #18636

    Oliszewski
    Member

    Peter,

    I would also like to suggest this is a very valuable feature. Users do goofy things and to make products friendly we have to ensure they don’t lose unsaved edits or fix errors before leaving such that data can be saved. Currently the process is ugly as the dialog fully closes and the only thing I can do is reopen the dialog, but that quickly becomes a hack as you have to bypass all the normal open functions as this is a “reopen”. Bottom line, having the ability to cancel the close would be a nice addition.

    Mike

    Preventing closing a wndow #21264

    Bentechsoft
    Participant

    I was searching the site to see if there was a way to cancel the close of a windows if after some validation I find errors when I stumbled on this post. So… It there a way or not. According to this post, there isn’t. Can you suggest a way to perform validation and cancel the close of a window.

    I’m assuming I could hide the “X” (close button), add two button binding each to a function which would do the validation and close the windows but that would not be super clean.

    If there isn’t a clean way to do this, I would also like to suppor the request for a “closing” event that would allow for adding validation to the form.

    Thank you

    Preventing closing a wndow #49933

    Makla
    Participant

    Did something new happen about that? I also need this feature.

    Preventing closing a wndow #50531

    Makla
    Participant

    Peter Stoev ?
    Dimitar ?
    Is there any page where we can vote for features?

    Preventing closing a wndow #82640

    omargarro
    Participant

    Hi out there!
    If someone is still looking for some workarround for this, what I did on my jqxWindow was:

    Set
    – showCloseButton: false
    – cancelButton: null
    – keyboardCloseKey :’none’

    then I created a jqxButton (#closeWinButton) and:

    $(‘#closeWinButton’).on(‘click’, function() {
    if( $(“#some_condition”).val() ) {
    if( confirm(“Do you really want to exit (without saving) ?”) ) {
    $(“#myWindow”).jqxWindow(‘close’);
    }
    } else {
    $(“#win”).jqxWindow(‘close’);
    }
    });

    Preventing closing a wndow #99080

    assembler
    Participant

    Is there any advance on this?

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.