Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button's in forms cause double submits onEnter #2

Open
mcwhittemore opened this issue Nov 10, 2015 · 0 comments
Open

Button's in forms cause double submits onEnter #2

mcwhittemore opened this issue Nov 10, 2015 · 0 comments

Comments

@mcwhittemore
Copy link

Because a button's default type is submit and a form will trigger a submit on enter, giving a button inside of <Submittable> an onSubmit callback that is the same as a the required onEnter callback will cause double submit.

This can be prevented by invoking event.preventDefault() inside of the callback, but we might want to look at preventing inside of react-submittable as this seems unexpected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant