diff --git a/sites/public/src/lib/helpers.tsx b/sites/public/src/lib/helpers.tsx index 7170c818ca..a23f9b67af 100644 --- a/sites/public/src/lib/helpers.tsx +++ b/sites/public/src/lib/helpers.tsx @@ -224,9 +224,10 @@ export const downloadExternalPDF = async (fileURL: string, fileName: string) => const url = window.URL.createObjectURL(new Blob([blob])) const link = document.createElement("a") link.href = url - link.setAttribute("download", `${fileName}.pdf`) link.target = "_blank" + link.setAttribute("download", `${fileName}.pdf`) + document.body.appendChild(link) link.click() link.parentNode.removeChild(link)