Add pop-up when user hits the 'back' button when viewing a shiny application in a web browser

I'm building a shinydashboard with lots of tabs and the natural thing to do might be to hit the back button to navigate between them (but shiny doesn't work like this!) is there an easy way to get a popup if someone hits the back button by accident?

What I've tried so far

I've tried this, but it only seems to impact 'refresh' (which actually isn't an issue because I've coded the inputs into the url) but not 'back'

This was recommended on Twitter, but I'd rather not change the URL if possible: GitHub - nteetor/blaze: Navigate URL paths with shiny

I think I would be looking for a javascript solution like the one in the link you posted.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.