diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts index e7197b9b9..3c692e496 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.ts +++ b/src-ui/src/app/components/document-detail/document-detail.component.ts @@ -1448,13 +1448,11 @@ export class DocumentDetailComponent iframe.contentWindow.focus() iframe.contentWindow.print() iframe.contentWindow.onafterprint = () => { - timer(100).subscribe(() => { - // delay to avoid FF print failure - document.body.removeChild(iframe) - URL.revokeObjectURL(blobUrl) - }) + document.body.removeChild(iframe) + URL.revokeObjectURL(blobUrl) } } catch (err) { + // FF throws cross-origin error on onafterprint const isCrossOriginAfterPrintError = err instanceof DOMException && (err.name === 'SecurityError' ||