fix(transcription): use navigator.sendBeacon for beforeunload save
Replace async executeSave in beforeunload handler with navigator.sendBeacon — synchronous and reliable for page unload. Sends pending text as JSON blob to the block update endpoint. Fixes @Sara: "beforeunload handlers cannot reliably await async" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -199,6 +199,7 @@ onMount(() => {
|
||||
{#if transcribeMode}
|
||||
<div class="w-[400px] shrink-0 border-l border-line lg:w-[480px]">
|
||||
<TranscriptionEditView
|
||||
documentId={doc.id}
|
||||
blocks={transcriptionBlocks}
|
||||
onBlockFocus={handleBlockFocus}
|
||||
onSaveBlock={saveBlock}
|
||||
|
||||
Reference in New Issue
Block a user