Close Action - Button. - Mendix Forum

Close Action - Button.

1

Currently I have a setup where I have an invisible button behind our popups, so that we are able to close the popup when clicking outside of the popup.

the only issue is that sometimes we want a cancel and other times we want a close (rollback or not data things)

currently for each popup we have a close and cancel varients.

I will make some kind of way to trigger the default popup close with JS, but it got me thinking.

why is there not “default button” like on datagrids, that just triggers the default “popup close action”.

 

asked
2 answers

that's a really smart solution, I just have an invisible button in my layout that triggers a Nanoflow with Javascrip action that simulates the samen button press :D 


Created

Try the following styling. It will just make the close button the entire window. Then it triggers the Close action if clicked outside the dialog. Maybe play around with z-index somewhere if necessary.


.modal-dialog .modal-header .close::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

Created