Skip to content

Commit

Permalink
Avoid showing lock icons when a parent block has blockEditingMode set…
Browse files Browse the repository at this point in the history
… to contentOnly
  • Loading branch information
talldan committed May 24, 2024
1 parent de9a53a commit 119390c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1759,16 +1759,13 @@ 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 true;
return getBlockEditingMode( state, rootClientId ) !== 'disabled';
}

/**
Expand Down

0 comments on commit 119390c

Please sign in to comment.