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

Unable to submit a form using the keyboard #4170

Closed
dinodeSimon opened this issue Dec 16, 2019 · 1 comment · Fixed by #4410
Closed

Unable to submit a form using the keyboard #4170

dinodeSimon opened this issue Dec 16, 2019 · 1 comment · Fixed by #4410
Assignees
Labels

Comments

@dinodeSimon
Copy link

What you were expecting:
To be able to complete and submit a create form using the keyboard

What happened instead:
You can tab through and fill out all of the inputs but once you get to the save button pressing space or enter does not submit the form. There doesn't appear to be any way to submit the form using the keyboard.

Steps to reproduce:
Go to https://marmelab.com/react-admin-demo/#/customers/create
Enter the details for the new customer using the keyboard
Tab down to the "Save" button
Press space or enter. Space shows an animation like it is going to submit but nothing happens.

Related code:
Possibly related to this section of the RA code stopping the keyboard input from submitting the form https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/button/SaveButton.js#L85

// As we handle the "click" through the mousedown event, we have to make sure we cancel
    // the default click in case the issue mentionned above does not occur.
    // Otherwise, this would trigger a standard HTML submit, not the final-form one.
    const handleClick = event => {
        event.preventDefault();
        event.stopPropagation();
    };

Other information:
This worked previously with RA2.

Environment

  • React-admin version: 3.0.4
  • Last version that did not exhibit the issue (if applicable): 2.9
  • Browser: Chrome
@fzaninotto
Copy link
Member

Confirmed, thanks for the report.

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