Closed HashJProgramming closed 1 year ago
999 quantity
2 ###digits
.ref-quantity-widget input { text-align: center; color: inherit; background: none; border: none; outline: none; width: 5.5em; font-size: 0.9em; padding: var(--ref-input-padding); }
onChange(e) { if (e.target === this.input) { if (!this.inStock) return; let r = Math.max(1, parseInt(e.target.value, 10) || 1); if ( ((r = Math.min(r, 99999)), (e.target.value = r), r == this.getQuantity(r)) ) return; this.setQuantity(r), this._onQuantityChange && this._onQuantityChange(this); return; } }
@ImMaddd
Thanks 💪
quanity-widget input bug
Here's the screenshots
999 quantity
2 ###digits
Bug fixed
CSS
JavaScript
@ImMaddd