[New plugin] Preventing a Navigation Away From The Page/Closing The Tab

Hi everyone,

I have just published a plugin that will trigger a browser popup that asks the user for a conformation to leave the page. This is great when a user has not saved their progress yet for example.

Demo page: https://pluginpreview.bubbleapps.io/triggerpopup
Plugin page: https://bubble.io/plugin/conformation-for-closing-tab-1583621299402x669767544486756400

3 Likes

Hi Thimo,

Thanks for the great works.

I have some questions about the plugin

  • Can I set the condition for when to show popup, e.g. user edit some fields but haven’t saved it yet
  • Is the popup interface customizable?

Thanks

Hi @otm.bubble!

Yes you can specify when to show/hide the popup. You can also see the editor here to get an idea of how it works: https://bubble.io/page?type=page&name=triggerpopup&id=pluginpreview&tab=tabs-1

Because this is the standard javascript popup for browsers it cannot be customized.

Won’t work at all on my iPhone?
Only works on desktop?

1 Like

I just noticed this plugin because of your post. I could use it, so I tried the demo page on my iPhone. No pop ups. :flushed:

Yes this is normal behavior as exit intent JS pop-ups used in this plugin (or in general) are not well supported on mobile without some really hacky workarounds. Maybe in the future I will try to make them work on mobile, but for now they are for desktop only :slight_smile:

1 Like

Hi Thimo, like the plugin! One suggestion, I had to hunt down your sample and editor links here on the forum, I would add those to your plugin page. Look forward to your next invention!

1 Like

Hi @paul.dalpozzo! I must have completely forgotten to add the demo page link :man_facepalming: I have pushed an update to correct this. Thank you for reporting!

1 Like

I was happy to have found the plugin but it didn’t work for me in all cases apple / safari.
Closing tab - popup is fired
Navigating away from page - nothing happens

Any thoughts?

Any chance you’ll add a custom message input? I need to tell users “why” they shouldn’t leave the page (when a call is active).

@john30 Because this is the standard javascript popup for browsers it unfortunately cannot be customized

1 Like