I have the popup working but sometimes a user clicks the back button on their browser to close the popup.

How can I make the browser back button close a 'magnific-popup' that is already open?

Thanks