preventDefault() inside keypress's handler

The following input won't register non-command keys since its keypress handler prevents the default action. Try pressing the Backspace or Del key in this input element - they will work since they are command keys.