Action When User Leaves Screen

I love that adalo gives us the option to have an action when we enter a screen, but I have noticed a odd issue with my app.

Users who have an iphone like to swipe back as a gesture. So example I have a new post page, and the user wants to create a post, but then changes their mind. If they swipe back it don’t auto delete the post. I do have a button for going back and it has the delete post automatically if not text in the box.

So I think having a function for when you leave a screen would do wonders. Having this extra feature in adalo would help me ensure my app runs the best it can to make it feel the most premium as possible. If i have that action I could setup it up the same way for the button that way it can auto happen, when they swipe back instead of clicking the back button.