Skip to content

Commit

Permalink
Preview: Open new window if prior preview window closed (#8446)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored Aug 15, 2018
1 parent dfada03 commit a0e0847
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 a0e0847

Please sign in to comment.