diff --git a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue index 98645873b..b22035bee 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue +++ b/src/Bundle/ChillDocStoreBundle/Resources/public/vuejs/StoredObjectButton/DownloadButton.vue @@ -34,6 +34,7 @@ async function download_and_open(event: Event): Promise { const raw = await download_and_decrypt_doc(urlInfo, props.storedObject.keyInfos, new Uint8Array(props.storedObject.iv)); button.href = window.URL.createObjectURL(raw); + button.target = '_blank'; button.type = props.storedObject.type; button.download = props.filename || 'document'; @@ -45,10 +46,7 @@ async function download_and_open(event: Event): Promise { state.is_ready = true; - // for fixing https://gitlab.com/Chill-Projet/chill-bundles/-/issues/98 - window.setTimeout(() => { - button.click() - }, 750); + button.click(); } }