Originally Posted by Webenvelopment
Enter button pressed while typing within the field was creating a page refresh...
It was because you were having a button of type "Submit" within your FORM.
Its the default functionality available in HTML FORM having a "button type=submi t" to be submitted when ENTER KEY pressed.
It didn't replicated because the button type was changed to "button".
No need to handle the keyup event.