File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/editor/src/components/post-publish-panel Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export class PostPublishPanel extends Component {
6262 isPublishSidebarEnabled,
6363 isScheduled,
6464 isSaving,
65+ isSavingNonPostEntityChanges,
6566 onClose,
6667 onTogglePublishSidebar,
6768 PostPublishExtension,
@@ -97,7 +98,11 @@ export class PostPublishPanel extends Component {
9798 />
9899 </ div >
99100 < div className = "editor-post-publish-panel__header-cancel-button" >
100- < Button onClick = { onClose } variant = "secondary" >
101+ < Button
102+ disabled = { isSavingNonPostEntityChanges }
103+ onClick = { onClose }
104+ variant = "secondary"
105+ >
101106 { __ ( 'Cancel' ) }
102107 </ Button >
103108 </ div >
@@ -140,6 +145,7 @@ export default compose( [
140145 isEditedPostBeingScheduled,
141146 isEditedPostDirty,
142147 isSavingPost,
148+ isSavingNonPostEntityChanges,
143149 } = select ( editorStore ) ;
144150 const { isPublishSidebarEnabled } = select ( editorStore ) ;
145151 const postType = getPostType ( getEditedPostAttribute ( 'type' ) ) ;
@@ -156,6 +162,7 @@ export default compose( [
156162 isPublished : isCurrentPostPublished ( ) ,
157163 isPublishSidebarEnabled : isPublishSidebarEnabled ( ) ,
158164 isSaving : isSavingPost ( ) ,
165+ isSavingNonPostEntityChanges : isSavingNonPostEntityChanges ( ) ,
159166 isScheduled : isCurrentPostScheduled ( ) ,
160167 } ;
161168 } ) ,
You can’t perform that action at this time.
0 commit comments