From d82a3e0ff6e57ebb1a763d5aa2c995bda6b78797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 24 May 2023 12:06:07 +0200 Subject: [PATCH] Fixed: [download document] add a target when downloading document --- .../public/vuejs/StoredObjectButton/DownloadButton.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); } }