Skip to content

Button's in forms cause double submits onEnter #2

@mcwhittemore

Description

@mcwhittemore

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions