From 3f1783d3844031fe5181569e42ae1b99ab0ce4df Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 3 Aug 2018 10:14:43 -0400 Subject: [PATCH] Preview: Open new window if prior preview window closed --- packages/editor/src/components/post-preview-button/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/components/post-preview-button/index.js b/packages/editor/src/components/post-preview-button/index.js index 9190a713b3e79d..c77aa106ce5340 100644 --- a/packages/editor/src/components/post-preview-button/index.js +++ b/packages/editor/src/components/post-preview-button/index.js @@ -64,7 +64,7 @@ export class PostPreviewButton extends Component { // Open a popup, BUT: Set it to a blank page until save completes. This // is necessary because popups can only be opened in response to user // interaction (click), but we must still wait for the post to save. - if ( ! this.previewWindow ) { + if ( ! this.previewWindow || this.previewWindow.closed ) { this.previewWindow = window.open( '', this.getWindowTarget() ); }