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 <noreply@anthropic.com>
This commit is contained in:
parent
c9e8f69c3f
commit
88cc05e999
1 changed files with 1 additions and 1 deletions
|
|
@ -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 };
|
||||
|
|
|
|||
Loading…
Reference in a new issue