In the new popup system, we can configure whether clicking the overlay closes the popup or not. However, since the overlay itself isn’t accessible as a component (like in the old ones), is there any way to trigger a custom workflow when the user clicks on it?
Use case:
I want the user to be able to close the popup by clicking the overlay only if no changes have been made in the form.
If there are unsaved changes, I’d like to show a confirmation message instead.
you can create a workaround for this situation.
You could create a variable for true and false and link it to the “Overlay close and open” action.
So if this variable is false your user won’t be able to close it by clicking the overlay.
I kind of feel like you might want to explore what @Agustin_Carozo was suggesting because if you are going to use both “escape key to close” and “overlay click closes” you need something to tell the former when to be on/off.
FWIW, there’s an event “on popup closing” that you can access in the component level workflows. It won’t solve this because its after, hence “on closing” (unless there’s a way to do it at or before), but I wanted to mention it as it’s useful to create the one workflow and have it triggered when using both the aforementioned way to close