-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Area: FrontendComponent: CheckoutEvent: dmcdindia1Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release
Description
Preconditions (*)
- Magento 2.3.1
- Firefox, Chrome, Safari
Steps to reproduce (*)
- Add a product to cart
- Go to cart page
- Edit the quantity
- Press enter inside quantity input box
Expected result (*)
- Quantity must be updated
Actual result (*)
- Cart gets empty
More info:
It happens in:
vendor/magento/module-checkout/view/frontend/templates/cart/form.phtml
Where there are two submit buttons in a form:
<button type="submit"
name="update_cart_action"
data-cart-empty=""
value="empty_cart"
title="<?= $block->escapeHtml(__('Clear Shopping Cart')) ?>"
class="action clear" id="empty_cart_button">
<span><?= /* @escapeNotVerified */ __('Clear Shopping Cart') ?></span>
</button>
<button type="submit"
name="update_cart_action"
data-cart-item-update=""
value="update_qty"
title="<?= $block->escapeHtml(__('Update Shopping Cart')) ?>"
class="action update">
<span><?= /* @escapeNotVerified */ __('Update Shopping Cart') ?></span>
</button>
When the Enter key is pressed inside quantity input box, the browser automatically chooses the first submit button which is to empty_cart. Order of these buttons should be reversed or a javascript added to define the default behavior when Enter key is pressed.
Additional Information (*)
FYI: This issue is only reproduced on magento 2.3.1 not in 2.3 nor in 2.2
Metadata
Metadata
Assignees
Labels
Area: FrontendComponent: CheckoutEvent: dmcdindia1Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseThe issue has been reproduced on latest 2.3 release