]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Update document-detail.component.ts
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 30 Oct 2025 22:29:56 +0000 (15:29 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Fri, 31 Oct 2025 00:00:15 +0000 (17:00 -0700)
src-ui/src/app/components/document-detail/document-detail.component.ts

index e7197b9b91d2fbfa289ccf25032a0e75828df514..3c692e4961bbcd593ae7f17e2fcaf0e0c8ad96b5 100644 (file)
@@ -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' ||