Trigger a Custom Event when a Page is Unloading

I want to run a custom event while the user leaving the page. I have tested the custom event, it is working, however, I want to run it while the user is leaving the page.

thanks…

I am sure that there is a plugin for this…

1 Like

I am sure that someone has solved it without a plugin.

There’s no Bubble native event like “When User leaves page” to detect this, but you could use Javascript and thats exactly what plugins do :blush: Page Close Event / Quit / Exit Plugin | Bubble

Just looking at the plugin code (and asking GPT to analyze the update function and the script it loads on the page) there’s a bit more going on than just a simple patch we can do in Bubble with Toolbox plugin.

1 Like

Actually, I have noticed that file uploader leaves orphaned files if thing has not been created, so I decided to delete after user leave the page. I have tried the plugin, it does not work properly. I found this solution.

1 Like