Skip to content

Commit

Permalink
ENGCOM-4630: [Backport] Fix: Cart is emptied when enter is pressed af…
Browse files Browse the repository at this point in the history
…ter changing product quantity #21512
  • Loading branch information
sivaschenko authored Apr 5, 2019
2 parents 45e991c + fec347b commit 14d5ac4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ define([
_create: function () {
var items, i;

$(this.options.emptyCartButton).on('click', $.proxy(function () {
$(this.options.emptyCartButton).on('click', $.proxy(function (event) {
if (event.detail === 0) {
return;
}

$(this.options.emptyCartButton).attr('name', 'update_cart_action_temp');
$(this.options.updateCartActionContainer)
.attr('name', 'update_cart_action').attr('value', 'empty_cart');
Expand Down

0 comments on commit 14d5ac4

Please sign in to comment.