From 88cc05e9991abadf01d6984414f5f16b71a1e32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20K=C3=BChn?= Date: Fri, 1 May 2026 10:23:41 +0200 Subject: [PATCH] Fix stopwatch fill button not updating addAmt state Setting inp.value programmatically bypasses the oninput handler that syncs addAmt[k], so addSet read 0. Firing the input event after fill ensures the value is registered. Co-Authored-By: Claude Sonnet 4.6 --- public/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app.js b/public/app.js index cbb54cc..42cec9b 100644 --- a/public/app.js +++ b/public/app.js @@ -993,7 +993,7 @@ var sw = (function(){ document.addEventListener('click', function(e){ if(!e.target.classList.contains('btn-sw-fill')) return; var inp = e.target.closest('.add-row, .qb-row').querySelector('.num-in'); - if(inp) inp.value = Math.floor(getMs() / 1000); + if(inp){ inp.value = Math.floor(getMs() / 1000); inp.dispatchEvent(new Event('input')); } }); return { getMs: getMs };