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 (#61922)

Co-authored-by: talldan <[email protected]>
Co-authored-by: youknowriad <[email protected]>
Co-authored-by: jameskoster <[email protected]>
  • Loading branch information
4 people authored May 24, 2024
1 parent 13717c6 commit cbf29f6
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

1 comment on commit cbf29f6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in cbf29f6.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9221891226
📝 Reported issues:

Please sign in to comment.