Skip to content

Commit

Permalink
Included MarkAdams closeWindow fix in PrintBase
Browse files Browse the repository at this point in the history
  • Loading branch information
Core121 committed Nov 30, 2023
1 parent f435612 commit 6268b5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/ngx-print.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,12 @@ export class PrintBase {
<script defer>
function triggerPrint(event) {
window.removeEventListener('load', triggerPrint, false);
${printOptions.previewOnly || !printOptions.closeWindow ? '' : `setTimeout(function() {
${printOptions.previewOnly ? '' : `setTimeout(function() {
closeWindow(window.print());
}, ${printOptions.printDelay});`}
}
function closeWindow(){
window.close();
${printOptions.closeWindow ? 'window.close();' : ''}
}
window.addEventListener('load', triggerPrint, false);
</script>
Expand Down

0 comments on commit 6268b5c

Please sign in to comment.