preventDefault for onKeyPress controls
Restored a function that shouldn't have been removed