Fix keypress event on number and input.