prevent form submission from happening when enter/spacebar is pressed