Make sure share dialog goes away when clicking outside of it, including links to other routes