Based on a single ItemView, I would like a way to implement 'are you sure you want to navigate away from this page? I have tried using 'onBeforeClose' events, but I don't think these can cancel the eventual navigation to another route. I think an earlier release of Marionette had this functionality, but I'm on 1.8.4.
Having 'onRoute' on each AppRouter also seems to lack the ability to cancel routing given some condition based on the current view. My next idea was overriding the 'navigate' function to check for some condition.
Having a 'before' function define seems to cancel routing when returning false, but at that point the url hash has already changed.
Any Marionette/Backbone specific pointers?