mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-11-11 17:16: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.focus()
|
||||||
iframe.contentWindow.print()
|
iframe.contentWindow.print()
|
||||||
iframe.contentWindow.onafterprint = () => {
|
iframe.contentWindow.onafterprint = () => {
|
||||||
timer(100).subscribe(() => {
|
document.body.removeChild(iframe)
|
||||||
// delay to avoid FF print failure
|
URL.revokeObjectURL(blobUrl)
|
||||||
document.body.removeChild(iframe)
|
|
||||||
URL.revokeObjectURL(blobUrl)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
// FF throws cross-origin error on onafterprint
|
||||||
const isCrossOriginAfterPrintError =
|
const isCrossOriginAfterPrintError =
|
||||||
err instanceof DOMException &&
|
err instanceof DOMException &&
|
||||||
(err.name === 'SecurityError' ||
|
(err.name === 'SecurityError' ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user