Magento2: Checkout: Placing an order using the enter key causes a redirect to the checkout

Created on 21 Apr 2020  路  31Comments  路  Source: magento/magento2

Preconditions (*)

  1. Tested on Magento 2.3.2, 2.3.3, 2.3.4 and 2.3.5
  2. At least one product enabled
  3. Enable "Purchase Order" as a payment method, or any other payment method where one or more input fields needs to be filled out

Steps to reproduce (*)

  1. Add a product to the cart and proceed to the checkout
  2. Enter your shipping details and proceed to "Review & Payments"
  3. Select "Purchase Order" as your payment of choice
  4. Enter a random "Purchase Order Number"
  5. Press enter while the focus is still on the "Purchase Order Numer" field

Expected result (*)

  1. form should be submitted (and validated) on keyboard Enter. Order is placed

Actual result (*)

  1. The checkout page reloads
    magento-issue--27925
Checkout Payment Fixed in 2.4.x Confirmed Format is valid Ready for Work P3 done Reported on 2.3.2 Reproduced on 2.4.x S2 Done

Most helpful comment

Hello @vestman
fyi: @dhairya-shah, @shikhamis11

Thank you for your detailed feedback, explanation, and proof links.

I raised this issue again at the triage meeting.
After additional discussion and detailed analysis by UX specialist, quote

In this case, I recommend that the form should be submitted (and validated) on keyboard Enter

I will update the expected results for Issue and related PR

Thank you again and sorry for inconveniences

All 31 comments

Hi @vestman. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@vestman do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

@magento give me 2.4-develop instance

Hi @vestman. Thank you for your request. I'm working on Magento 2.4-develop instance for you

Hi @vestman, here is your Magento instance.
Admin access: https://i-27925-2-4-develop.instances.magento-community.engineering/admin_5c30
Login: f87617b8 Password: 60b2fb6c03ff
Instance will be terminated in up to 3 hours.

Hi @vestman, here is your Magento instance.
Admin access: https://i-27925-2-4-develop.instances.magento-community.engineering/admin_5c30
Login: f87617b8 Password: 60b2fb6c03ff
Instance will be terminated in up to 3 hours.

Confirmed behavior on the vanilla Magento instance provided above.

Hi @shikhamis11. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

@magento give me 2.4-develop instance

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.4-develop instance for you

Hi @shikhamis11, here is your Magento instance.
Admin access: https://i-27925-2-4-develop.instances.magento-community.engineering/admin_4076
Login: 375ebddb Password: fb2152b818c4
Instance will be terminated in up to 3 hours.

@magento give me 2.4-develop instance

Hi @shikhamis11. Thank you for your request. I'm working on Magento 2.4-develop instance for you

Hi @shikhamis11, here is your Magento instance.
Admin access: https://i-27925-2-4-develop.instances.magento-community.engineering/admin_f2ce
Login: 96574240 Password: a03f91ac3f9f
Instance will be terminated in up to 3 hours.

:white_check_mark: Confirmed by @shikhamis11
Thank you for verifying the issue. Based on the provided information internal tickets MC-33618 were created

Issue Available: @shikhamis11, _You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself._

@magento give me 2.3.4 instance

Hi @CarmineDamore78. Thank you for your request. I'm working on Magento 2.3.4 instance for you

Hi @CarmineDamore78, here is your Magento instance.
Admin access: https://i-27925-2-3-4.instances.magento-community.engineering/admin_ee5c
Login: 5add296c Password: c915e6761b0f
Instance will be terminated in up to 3 hours.

Hi @vestman
I wasn't enable to reproduce the issue on M2.3.4

@magento give me 2.3.4 instance

Hi @vestman. Thank you for your request. I'm working on Magento 2.3.4 instance for you

Hi @vestman, here is your Magento instance.
Admin access: https://i-27925-2-3-4.instances.magento-community.engineering/admin_83a3
Login: 05068f8d Password: 566437dd4bf6
Instance will be terminated in up to 3 hours.

@CarmineDamore78
magento-issue--27925

@magento give me 2.4-develop instance

Hi @chandru-199. Thank you for your request. I'm working on Magento 2.4-develop instance for you

Hi @chandru-199, here is your Magento instance.
Admin access: https://i-27925-2-4-develop.instances.magento-community.engineering/admin_0b3c
Login: 4c6379ec Password: 01ff55536c2c
Instance will be terminated in up to 3 hours.

@magento assign me this issue. Will start working on this.

I am working on this issue.

Hello @vestman
fyi: @dhairya-shah, @shikhamis11

This issue has been reviewed by Magento team during the internal triage meeting.

Based on feedback from Product Managers and UX expected result should be changed.

Expected Result

  • The order should NOT be placed and after push "Enter" button
  • The page should not be reloading

I updated issue description

@sdzhepa

Thanks for reviewing the issue. May I ask what led you to come to the conclusion that the form should not be submitted on enter keypress when the input field has focus? I'm all for a discussion, so I'll start...

If you have focus in a textbox and hit enter, the form will be submitted automatically. This behavior is consistent across all browsers and is known as implicit submission. It's a common way to submit forms and dare I say that many (most?) of the end users will expect it to work like that. And let's not forget about accessibility. Let's quote the html5 spec:

There are pages on the Web that are only usable if there is a way to implicitly submit forms, so user agents are strongly encouraged to support this.
https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission

Hello @vestman
fyi: @dhairya-shah, @shikhamis11

Thank you for your detailed feedback, explanation, and proof links.

I raised this issue again at the triage meeting.
After additional discussion and detailed analysis by UX specialist, quote

In this case, I recommend that the form should be submitted (and validated) on keyboard Enter

I will update the expected results for Issue and related PR

Thank you again and sorry for inconveniences

Thanks for involving the UX team :+1:

Was this page helpful?
0 / 5 - 0 ratings