The way of listening quantity input in product page is a problem. In fact, we need to check quantity min not when we are typing but only on change. If we do this check on keyup or keydown, we can't type a backspace to empty the input before typing our new value, and also, if the min quantity of the product is set at 5, if we want to type 10 after a backspace, we force to 5 when the 1 key is typed and before the 0 of 10.
In fact, we need to check quantity min not when we are typing but only on change. If we do this check on keyup or keydown, we can't type a
backspace
to empty the input before typing our new value, and also, if the min quantity of the product is set at 5, if we want to type10
after abackspace
, we force to5
when the1
key is typed and before the0
of10
.