Skip to content
Discussion options

You must be logged in to vote

@dhess

Your "Add" button does not set attribute type, therefore, type="submit" will be the default attribute of HTML Button element and causes onSubmit event handler to be triggered because "Add" is now a submit button.

Just add attribute type="button" to solve this problem.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@dhess
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@dhess
Comment options

@prphawk
Comment options

@slinden2
Comment options

Answer selected by dhess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants