From 9e1a3daabfd2e79a4db0f546aa4e9174d6dd3918 Mon Sep 17 00:00:00 2001 From: CskCnklc Date: Mon, 15 Oct 2018 21:26:52 +0100 Subject: [PATCH] Solve safari print issue --- src/index.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/index.js b/src/index.js index 24bcdaf..1aead2f 100644 --- a/src/index.js +++ b/src/index.js @@ -37,7 +37,6 @@ class ReactToPrint extends React.Component { setTimeout(() => { target.contentWindow.focus(); target.contentWindow.print(); - this.removeWindow(target); if (onAfterPrint) { onAfterPrint(); @@ -46,12 +45,6 @@ class ReactToPrint extends React.Component { }, 500); } - removeWindow(target) { - setTimeout(() => { - target.parentNode.removeChild(target); - }, 500); - } - handlePrint = () => { const {