Skip to content

Cart is emptied when enter is pressed after changing product quantity #21499

@wojtekn

Description

@wojtekn

Preconditions

  1. Latest 2.3-develop

Steps to reproduce

  1. Add any product to cart
  2. Navigate to the cart
  3. Un-hide "Clear Shopping Cart" button which is hidden in Luma by default by running this in browser console:
    jQuery("#empty_cart_button").show();
  4. Change item quantity in the input
  5. Press "Enter"

Expected result

  1. Page is reloaded and item quantity is changed

Actual result

  1. Cart is cleared

This happens because there are two submit buttons in the cart form, and when enter is pressed, the first one is executed. First one is "Clear Shopping Cart", so cart is cleared instead of updated. The simplest fix is to change order of those elements in source code.

Metadata

Metadata

Labels

Component: CheckoutFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions