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

[fields] Fix regression preventing form submit on "Enter" click #13065

Merged
merged 8 commits into from
May 9, 2024

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented May 9, 2024

Fixes #12964

  • Fix a regression where clicking Enter on a picker field would not trigger a form submit, due to the present event.preventDefault(); call.
  • Add an explicit handler for "Enter" clicking (insertParagraph) and "Shift" + "Enter" (insertLineBreak) to avoid changing the current v7 fields behavior.
  • Add e2e (unit tests proved difficult to write) tests for v6 and v7 behaviors
    • comment out the v7 behavior tests until a solution is shipped

@LukasTy LukasTy added regression A bug, but worse component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition labels May 9, 2024
@LukasTy LukasTy self-assigned this May 9, 2024
@mui-bot
Copy link

mui-bot commented May 9, 2024

Deploy preview: https://deploy-preview-13065--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 9364bad

@LukasTy LukasTy changed the title [fields] Fix regression prevent form submitting on "Enter" click [fields] Fix regression preventing form submit on "Enter" click May 9, 2024
@LukasTy LukasTy merged commit f13c0f9 into mui:master May 9, 2024
17 checks passed
@LukasTy LukasTy deleted the fix-fields-form-submitting branch May 9, 2024 12:44
joakimtveter pushed a commit to joakimtveter/mui-x that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! feature: Keyboard editing Related to the pickers keyboard edition regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fields] hitting "enter" on keyboard does not submit HTML form
3 participants