diff --git a/public/js/notes.js b/public/js/notes.js index d81775d..04a6c32 100644 --- a/public/js/notes.js +++ b/public/js/notes.js @@ -126,13 +126,16 @@ _dirty = true; updateStatus('Saving…', 'saving'); scheduleAutosave(); }); - // Voice recording controls + // Voice recording controls. addEventListener passes the click Event + // as the first argument — wrap so the truthy Event doesn't get passed + // to stopRecording(silent) and trigger the silent-cancel branch + // (which shuts the mic without transcribing → "Stop does nothing"). var recStart = $('btn-note-rec-start'); var recPause = $('btn-note-rec-pause'); var recStop = $('btn-note-rec-stop'); - if (recStart) recStart.addEventListener('click', startRecording); - if (recPause) recPause.addEventListener('click', togglePauseRecording); - if (recStop) recStop.addEventListener('click', stopRecording); + if (recStart) recStart.addEventListener('click', function() { startRecording(); }); + if (recPause) recPause.addEventListener('click', function() { togglePauseRecording(); }); + if (recStop) recStop.addEventListener('click', function() { stopRecording(false); }); // Ctrl/Cmd+S still saves manually from the editor document.addEventListener('keydown', function(e) { diff --git a/public/sw.js b/public/sw.js index 7f66d43..cc5c573 100644 --- a/public/sw.js +++ b/public/sw.js @@ -4,7 +4,7 @@ // API calls always fresh (critical for medical data accuracy) // ============================================================ -var CACHE_NAME = 'pedscribe-v12-notes6'; +var CACHE_NAME = 'pedscribe-v12-notes7'; var SHELL_ASSETS = [ '/', '/index.html',