Prevent navigation changes with e.preventDefault()