Skip to content

Commit

Permalink
Preview: Open new window if prior preview window closed
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Aug 4, 2018
1 parent 426f484 commit 3f1783d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
}

Expand Down

0 comments on commit 3f1783d

Please sign in to comment.