mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fixed: [download document] add a target when downloading document
This commit is contained in:
parent
5109490aad
commit
d82a3e0ff6
@ -34,6 +34,7 @@ async function download_and_open(event: Event): Promise<void> {
|
||||
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<void> {
|
||||
|
||||
state.is_ready = true;
|
||||
|
||||
// for fixing https://gitlab.com/Chill-Projet/chill-bundles/-/issues/98
|
||||
window.setTimeout(() => {
|
||||
button.click()
|
||||
}, 750);
|
||||
button.click();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user