Skip to content

fix: submit field form dialog on Enter key#106

Merged
liamwalder merged 2 commits intodevelopfrom
fix/field-form-enter-submit
Mar 30, 2026
Merged

fix: submit field form dialog on Enter key#106
liamwalder merged 2 commits intodevelopfrom
fix/field-form-enter-submit

Conversation

@lunenas
Copy link
Copy Markdown
Collaborator

@lunenas lunenas commented Mar 27, 2026

Summary

Allow submitting the CMS field create/edit dialog by pressing Enter
instead of requiring a click on the submit button.

Changes

  • Wrap FieldFormDialog content in a <form> element with onSubmit handler
  • Set submit button to type="submit" and cancel button to type="button"
  • Guard form submission with the existing isSubmitDisabled check

Test plan

  • Open the "New field" dialog, fill in a name, and press Enter — field is created
  • Open "Edit field" dialog, change the name, and press Enter — field is updated
  • Verify pressing Enter with an empty name does not submit
  • Verify clicking Cancel still closes the dialog without submitting

Made with Cursor

Wrap dialog content in a form element so pressing Enter triggers
the create/update action without needing to click the button.

Made-with: Cursor
@liamwalder liamwalder merged commit 67eec81 into develop Mar 30, 2026
2 checks passed
@liamwalder liamwalder deleted the fix/field-form-enter-submit branch March 30, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement Improve existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants