prevent event default so the browser history isn't affected