diff --git a/edit-post/components/header/style.scss b/edit-post/components/header/style.scss
index a99539ea6bf2c..db312fee2fcf3 100644
--- a/edit-post/components/header/style.scss
+++ b/edit-post/components/header/style.scss
@@ -31,7 +31,7 @@
display: none;
@include break-small {
- display: inline-block;
+ display: inline-flex;
}
}
}
diff --git a/editor/components/post-permalink/index.js b/editor/components/post-permalink/index.js
index ced2fc2437211..ae389492cf19c 100644
--- a/editor/components/post-permalink/index.js
+++ b/editor/components/post-permalink/index.js
@@ -9,8 +9,8 @@ import classnames from 'classnames';
import { withDispatch, withSelect } from '@wordpress/data';
import { Component } from '@wordpress/element';
import { __ } from '@wordpress/i18n';
-import { ClipboardButton, Button } from '@wordpress/components';
import { compose } from '@wordpress/compose';
+import { ClipboardButton, Button, ExternalLink } from '@wordpress/components';
/**
* Internal Dependencies
@@ -48,7 +48,7 @@ class PostPermalink extends Component {
componentDidUpdate( prevProps, prevState ) {
// If we've just stopped editing the permalink, focus on the new permalink.
if ( prevState.isEditingPermalink && ! this.state.isEditingPermalink ) {
- this.permalinkButton.focus();
+ this.linkElement.focus();
}
}
@@ -79,15 +79,15 @@ class PostPermalink extends Component {
{ __( 'Permalink:' ) }
{ ! isEditingPermalink &&
-
+
}
{ isEditingPermalink &&
diff --git a/editor/components/post-preview-button/index.js b/editor/components/post-preview-button/index.js
index 154f9f98d7c54..d35b29a699eb2 100644
--- a/editor/components/post-preview-button/index.js
+++ b/editor/components/post-preview-button/index.js
@@ -63,12 +63,16 @@ export class PostPreviewButton extends Component {
* @param {MouseEvent} event Click event from preview button click.
*/
openPreviewWindow( event ) {
- const { isAutosaveable, previewLink } = this.props;
+ const { isAutosaveable, previewLink, currentPostLink } = this.props;
// If there are no changes to autosave, we cannot perform the save, but
// if there is an existing preview link (e.g. previous published post
// autosave), it should be reused as the popup destination.
- if ( ! isAutosaveable && ! previewLink ) {
+ if ( ! isAutosaveable && ! previewLink && currentPostLink ) {
+ this.previewWindow = window.open(
+ currentPostLink,
+ this.getWindowTarget()
+ );
return;
}
@@ -115,15 +119,13 @@ export class PostPreviewButton extends Component {
}
render() {
- const { currentPostLink, isSaveable } = this.props;
+ const { isSaveable } = this.props;
return (