From fc47cd8c273cad76c27f5d6e89622b4b5746db02 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Tue, 5 May 2026 05:19:51 +0000 Subject: [PATCH] fix: allow free-form quantity input for ml/g sub-units (no step constraint) --- assets/js/app.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index f6a6b97..fd90af7 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -6774,16 +6774,16 @@ function switchUseUnit(mode) { _useConfMode._activeUnit = 'sub'; const step = getSubUnitStep(_useConfMode.packageUnit); qtyInput.value = step; - qtyInput.step = step; - qtyInput.min = step; + qtyInput.step = 'any'; + qtyInput.min = 1; hint.textContent = t('recipes.quantity_in_total', { unit: _useConfMode.subLabel, total: `${Math.round(_useConfMode.totalSub)}${_useConfMode.subLabel}` }); } else { confBtn.classList.add('active'); subBtn.classList.remove('active'); _useConfMode._activeUnit = 'conf'; qtyInput.value = 1; - qtyInput.step = 0.5; - qtyInput.min = 0.5; + qtyInput.step = 'any'; + qtyInput.min = 0.1; hint.textContent = t('recipes.packs_of_have', { size: `${_useConfMode.packageSize}${_useConfMode.subLabel}`, count: _useConfMode.totalConf.toFixed(1) }); } }