Fix: delay iframe DOM removal for print in FF

This commit is contained in:
shamoon
2025-10-30 17:24:44 -07:00
parent 245e52a4eb
commit 8f969ecab5

View File

@@ -1455,9 +1455,7 @@ export class DocumentDetailComponent
// FF throws cross-origin error on onafterprint
const isCrossOriginAfterPrintError =
err instanceof DOMException &&
(err.name === 'SecurityError' ||
err.message.includes('onafterprint')) &&
err.message.includes('cross-origin')
err.message.includes('onafterprint')
if (!isCrossOriginAfterPrintError) {
this.toastService.showError($localize`Print failed.`, err)
}