From 24a45cb0b6ae28838be91fb8c9e0cccf882bd828 Mon Sep 17 00:00:00 2001 From: Test User Date: Tue, 5 May 2026 09:29:31 +0800 Subject: [PATCH] fix: delay ObjectURL revocation to prevent failed frame capture downloads setTimeout(..., 0) revokes the blob URL on the next microtask, before the browser has initiated the download triggered by link.click(). This causes empty or failed downloads for frame captures. Use a 1-second delay to ensure the download starts. Co-Authored-By: Claude Opus 4.7 --- packages/studio/src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/studio/src/App.tsx b/packages/studio/src/App.tsx index ce4afc1c6..df8dbf571 100644 --- a/packages/studio/src/App.tsx +++ b/packages/studio/src/App.tsx @@ -872,7 +872,7 @@ export function StudioApp() { document.body.appendChild(link); link.click(); link.remove(); - setTimeout(() => URL.revokeObjectURL(blobUrl), 0); + setTimeout(() => URL.revokeObjectURL(blobUrl), 1000); } catch (err) { const message = err instanceof Error ? err.message : "Capture failed"; showToast(message);