mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-11 00:56:43 -05:00
Update document-detail.component.ts
This commit is contained in:
parent
d6e2456baf
commit
a8c75d95d8
@ -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' ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user