Jetpack Search purchase flow: Allow 'enter' key form submission during purchase flow #104885
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Addresses #54344
This PR enables the use of the
Enter
key to submit the form at/purchase-product/jetpack_search/monthly
.Note
Because
components/suggestion-search/index.jsx
is modified, this change also impacts any form that uses this component, meaning thatEnter
key submission would not be limited to only the form shown through the/purchase-product/jetpack_search/monthly
flow. I looked into limiting the change to the one form, but ifEnter
key submission is a UX/QoL concern for the Jetpack Search purchase flow, then I would expect it to be a concern for similar flows elsewhere, and so we wouldn't want to limit this change.Why are these changes being made?
This addresses a UX/QoL concern. As a user, I would expect to be able to press
Enter
twice when going through this purchase flow — once to select my site from the Site Search field and again to submit the form itself via theGet Search
button. Right now, pressingEnter
to select my site preventsEnter
being used again to submit the form.Testing Instructions
/purchase-product/jetpack_search/monthly
and begin to type your site's URLEnter
to select the suggested siteEnter
again to submit the Jetpack SearchGet Search
formenter
key pressesConfirm no unexpected behaviour at the other paths impacted by this change:
/purchase-product/jetpack_search
/purchase-product/jetpack_search/monthly
/purchase-product/wpcom_search
/purchase-product/wpcom_search/monthly
Confirm Jetpack connection flow is not impacted, including:
/jetpack/connect/
/jetpack/connect/search
Pre-merge Checklist