Forum Academy Marketplace Showcase Pricing Features

Disable Back Button when Popup is open

Hey Bubblers,
I have a specific requirement…
I want the back button to stop working while a particular popup is open.

Reason: When someone presses the back button while the popup is open, the site moves to the previous page instead of just closing the popup,

I have many popups and trying to create a URL based opening for all of them is a very long and tedious process, a route which I do not wish to take… at least till I exhaust all my options.

I have tried the back-button disable plugin, but that is all or nothing kind of a plugin, it applies to the whole site and not just when a popup is open.

Any ideas would be welcomed, need help with this one…

TIA

Hey guys… After spending hours scratching my head… I found a temporary solution…
There is a plugin ‘Back Button Disable’ I am using that, but as I said its complete website plugin… so what I did was…
Created a state on Website : Popup Open (Yes/No)
And added a ‘Only When’ to when the state is Yes
And set the state to change with popup open and close…

It did the trick!