Ensure prevent default on keystroke.