Skip to content

preventing forms from submitting when enter key is pressed#277

Merged
camposeddie merged 1 commit intodevelopfrom
EDPUB-1717-Fix-unexpected-form-submission
Feb 5, 2026
Merged

preventing forms from submitting when enter key is pressed#277
camposeddie merged 1 commit intodevelopfrom
EDPUB-1717-Fix-unexpected-form-submission

Conversation

@ckd002
Copy link
Copy Markdown
Contributor

@ckd002 ckd002 commented Feb 4, 2026

Description

When a user was filling out a form, hitting the enter key would result in the form attempting to submit. If the user did this and all other fields were filled in, it would submit even if the user wasn't ready for it to do so. This fix prevents the application from attempting to submit the form when the enter key is pressed while maintaining the ability to use the enter key in fields where multiple lines are accepted.

Linked JIRA Task or Github Issue

JIRA Task: EDPUB-1717

Types of changes

What types of changes does your code introduce to Earthdata Pub (EDPub)?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if adding or updating the existing documentation resources)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the Contributing Guide
  • I have updated the CHANGELOG
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

Validation Steps

This will help us get a jump start on validating your PR by describing the steps to replicate
and validate the expected behavior. (For an example of good validation instructions, check out Bryan's Bouncy Ball PR.)

  1. Make sure all merge request checks have passed (CI/CD).
  2. Pull related branches locally.
  3. Navigate to the DAR form
  4. Click on each form element and then hit enter to verify that the form doesn't submit
  5. Repeat step 4 on a DER form (Yes this is necessary because the fix is handled on an input basis so not everything is covered by the first form)
  6. Repeat step 4 for a DPR form

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@ckd002 ckd002 requested a review from a team as a code owner February 4, 2026 21:20
@camposeddie camposeddie merged commit f18b76e into develop Feb 5, 2026
1 check passed
@camposeddie camposeddie deleted the EDPUB-1717-Fix-unexpected-form-submission branch February 5, 2026 20:36
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

Successfully merging this pull request may close these issues.

2 participants