Skip to content

Commit

Permalink
Fix canMoveBlock with block editing mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed Apr 30, 2024
1 parent f824d5a commit 2bdd5f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/block-editor/src/store/selectors.js
Expand Up @@ -1752,14 +1752,16 @@ export function canMoveBlock( state, clientId, rootClientId = null ) {
if ( attributes === null ) {
return true;
}
if ( getBlockEditingMode( state, rootClientId ) !== 'default' ) {
return false;
}
if ( attributes.lock?.move !== undefined ) {
return ! attributes.lock.move;
}
if ( getTemplateLock( state, rootClientId ) === 'all' ) {
return false;
}

return getBlockEditingMode( state, rootClientId ) !== 'disabled';
return true;
}

/**
Expand Down
Expand Up @@ -103,7 +103,7 @@ function ContentOnlySettingsMenuItems( { clientId } ) {
);
}

export default function TemplateContentOnlySettingsMenu() {
export default function ContentOnlySettingsMenu() {
return (
<BlockSettingsMenuControls>
{ ( { selectedClientIds } ) =>
Expand Down
@@ -0,0 +1,3 @@
export default function ContentOnlySettingsMenu() {
return null;
}

0 comments on commit 2bdd5f2

Please sign in to comment.