diff --git a/packages/editor/src/components/post-publish-modal/index.js b/packages/editor/src/components/post-publish-modal/index.js index 37ac097690d5a..7ca30b5c0dfbb 100644 --- a/packages/editor/src/components/post-publish-modal/index.js +++ b/packages/editor/src/components/post-publish-modal/index.js @@ -32,14 +32,6 @@ export class PostPublishModal extends Component { this.onSubmit = this.onSubmit.bind( this ); } - componentDidUpdate( prevProps ) { - // Automatically collapse the publish sidebar when a post - // is published and the user makes an edit. - if ( prevProps.isPublished && ! this.props.isSaving && this.props.isDirty ) { - this.props.onClose(); - } - } - onSubmit() { const { onClose, hasPublishAction, isPostTypeViewable } = this.props; if ( ! hasPublishAction || ! isPostTypeViewable ) { diff --git a/packages/editor/src/components/post-publish-modal/postpublish.js b/packages/editor/src/components/post-publish-modal/postpublish.js index 2c1d3ca4dd3f6..c7261bd1d9cd9 100644 --- a/packages/editor/src/components/post-publish-modal/postpublish.js +++ b/packages/editor/src/components/post-publish-modal/postpublish.js @@ -13,11 +13,6 @@ import { Component, createRef } from '@wordpress/element'; import { withSelect } from '@wordpress/data'; import { safeDecodeURIComponent } from '@wordpress/url'; -/** - * Internal dependencies - */ -// import PostScheduleLabel from '../post-schedule/label'; - class PostPublishModalPostpublish extends Component { constructor() { super( ...arguments ); @@ -25,16 +20,9 @@ class PostPublishModalPostpublish extends Component { showCopyConfirmation: false, }; this.onCopy = this.onCopy.bind( this ); - this.onSelectInput = this.onSelectInput.bind( this ); this.postLink = createRef(); } - // componentDidMount() { - // if ( this.props.focusOnMount ) { - // this.postLink.current.focus(); - // } - // } - componentWillUnmount() { clearTimeout( this.dismissCopyConfirmation ); } @@ -52,10 +40,6 @@ class PostPublishModalPostpublish extends Component { }, 4000 ); } - onSelectInput( event ) { - event.target.select(); - } - render() { const { children, isScheduled, post, postType } = this.props; const postLabel = get( postType, [ 'labels', 'singular_name' ] ); diff --git a/packages/editor/src/components/post-publish-modal/prepublish.js b/packages/editor/src/components/post-publish-modal/prepublish.js index eab32e584086d..7b247a415ebe2 100644 --- a/packages/editor/src/components/post-publish-modal/prepublish.js +++ b/packages/editor/src/components/post-publish-modal/prepublish.js @@ -7,8 +7,6 @@ import { get, find } from 'lodash'; * WordPress dependencies */ import { __, sprintf } from '@wordpress/i18n'; -// import { PanelBody } from '@wordpress/components'; - import { withSelect } from '@wordpress/data'; /** @@ -17,10 +15,6 @@ import { withSelect } from '@wordpress/data'; import PostVisibilityLabel from '../post-visibility/label'; import PostScheduleLabel from '../post-schedule/label'; import { visibilityOptions } from '../post-visibility/utils'; -// import PostVisibility from '../post-visibility'; -// import PostSchedule from '../post-schedule'; -// import MaybeTagsPanel from './maybe-tags-panel'; -// import MaybePostFormatPanel from './maybe-post-format-panel'; function PostPublishModalPrepublish( { hasPublishAction,