Opened 7 years ago

Closed 7 years ago

#8397 closed feature (worksforme)

ui.dialog confirm on close

Reported by: prdatur Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.21
Keywords: Cc:
Blocked by: Blocking:

Description

It would be very usefull if we can return the boolean false within the "close" event function to avoid closing, true or undefined to close it. So the current situation will not effect any code because the default behaviour "undefined" will just close it how it currently does.

My Situation: I want to open a websocket on a dialog open, but after this succeed and the user click the close icon (or press "esc") it will be very normal to ask the user if he realy wants to quit the current view (in my case it will be a game). I can close the websocket connection fine within the close event, but maybe the user didn't wanted to press the "esc" key.

With this new option i could always return false so the dialog will be not closed unless the user confirmed the closing.

What do you think about this?

best regards, Christian

Change History (1)

comment:1 Changed 7 years ago by Scott González

Resolution: worksforme
Status: newclosed

That's what the beforeClose event is for.

Note: See TracTickets for help on using tickets.