Skip to content

Commit cfae8cd

Browse files
committed
Bugfix on some Safari browsers, in exceptional circumstances, the blob download starts after the download link containing the blob has already been removed from the DOM, creating an "object not found"-error.
1 parent 0b3804e commit cfae8cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/importExport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ function download_by_blob(text, filename, mimeType): void {
431431
element.style.display = 'none';
432432
document.body.appendChild(element);
433433
element.click();
434-
document.body.removeChild(element);
434+
setTimeout(() => document.body.removeChild(element), 1000); // 1-second delay
435435
} else {
436436
this.location.go(`${mimeType},${encodeURIComponent(text)}`);
437437
}

0 commit comments

Comments
 (0)