From 361ffabe575ca7d9f04edfcbeea300afb7ad9cde Mon Sep 17 00:00:00 2001 From: chihlasm Date: Fri, 13 Mar 2026 02:39:57 -0400 Subject: [PATCH] fix: attach anchor to document before click for Firefox download compatibility Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/components/scripts/ScriptGeneratorPanel.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/components/scripts/ScriptGeneratorPanel.tsx b/frontend/src/components/scripts/ScriptGeneratorPanel.tsx index b7122ecd..fd60b882 100644 --- a/frontend/src/components/scripts/ScriptGeneratorPanel.tsx +++ b/frontend/src/components/scripts/ScriptGeneratorPanel.tsx @@ -44,7 +44,9 @@ export function ScriptGeneratorPanel() { const a = document.createElement('a') a.href = url a.download = `${selectedTemplate.slug}.ps1` + document.body.appendChild(a) a.click() + document.body.removeChild(a) URL.revokeObjectURL(url) }