Ensure keypress event is cleared on keyup.