Skip to content

Commit d784dd4

Browse files
author
Roger
committed
Issue 36299: Item Qty Goes Negative When Using The Down Arrow Keyboard Key
1 parent 49bd706 commit d784dd4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/code/Magento/Checkout/view/frontend/templates/cart/item/default.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ $canApplyMsrp = $helper->isShowBeforeOrderConfirm($product) && $helper->isMinima
104104
data-cart-item-id="<?= $block->escapeHtmlAttr($_item->getSku()) ?>"
105105
value="<?= $block->escapeHtmlAttr($block->getQty()) ?>"
106106
type="number"
107+
min="0"
107108
size="4"
108109
step="any"
109110
title="<?= $block->escapeHtmlAttr(__('Qty')) ?>"

app/code/Magento/Checkout/view/frontend/web/template/minicart/item/default.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,9 @@
8181
'data-cart-item-id': product_sku
8282
}, value: qty"
8383
type="number"
84+
min="0"
8485
size="4"
85-
class="item-qty cart-item-qty"/>
86+
class="item-qty cart-item-qty">
8687
<button data-bind="attr: {
8788
id: 'update-cart-item-'+item_id,
8889
'data-cart-item': item_id,

0 commit comments

Comments
 (0)