Skip to content

Commit

Permalink
Add conditions to ensure Publish button isn’t accidentally a toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jun 18, 2021
1 parent 35a58a0 commit 47315e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export function PostPublishButtonOrToggle( {
( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )
) {
component = IS_BUTTON;
} else if ( isSmallerThanMediumViewport ) {
} else if ( isSmallerThanMediumViewport && ! isPublishSidebarOpened ) {
component = IS_TOGGLE;
} else if ( isPublishSidebarEnabled ) {
} else if ( isPublishSidebarEnabled && ! isPublishSidebarOpened ) {
component = IS_TOGGLE;
} else {
component = IS_BUTTON;
Expand Down

0 comments on commit 47315e4

Please sign in to comment.