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 29, 2024
1 parent cb90568 commit bc47175
Showing 1 changed file with 4 additions and 2 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

0 comments on commit bc47175

Please sign in to comment.