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
No known key found for this signature in database

View File

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