Skip to content

Commit 25e73e4

Browse files
authored
ENGCOM-4400: Fix: Cart is emptied when enter is pressed after changing product quantity #21509
2 parents 8d0b856 + 765e149 commit 25e73e4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/code/Magento/Checkout/view/frontend/web/js/shopping-cart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ define([
1414
_create: function () {
1515
var items, i, reload;
1616

17-
$(this.options.emptyCartButton).on('click', $.proxy(function () {
17+
$(this.options.emptyCartButton).on('click', $.proxy(function (event) {
18+
if (event.detail === 0) {
19+
return;
20+
}
21+
1822
$(this.options.emptyCartButton).attr('name', 'update_cart_action_temp');
1923
$(this.options.updateCartActionContainer)
2024
.attr('name', 'update_cart_action').attr('value', 'empty_cart');

0 commit comments

Comments
 (0)