Skip to content

Commit

Permalink
Fix write mode outdent
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Oct 2, 2024
1 parent 9641814 commit 15af088
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,9 @@ const canInsertBlockTypeUnmemoized = (
}

const _isSectionBlock = !! isSectionBlock( state, rootClientId );
if ( _isSectionBlock && ! allowsContentOnlyInsertion ) {
const allowSectionInsertion =
!! parentBlockListSettings?.contentOnlyInsertion;
if ( _isSectionBlock && ! allowSectionInsertion ) {
return false;
}

Expand Down Expand Up @@ -1794,7 +1796,9 @@ export function canRemoveBlock( state, clientId ) {
}

const isBlockWithinSection = !! getParentSectionBlock( state, clientId );
if ( isBlockWithinSection && ! allowsContentOnlyInsertion ) {
const allowSectionInsertion =
!! parentBlockListSettings?.contentOnlyInsertion;
if ( isBlockWithinSection && ! allowSectionInsertion ) {
return false;
}

Expand Down

0 comments on commit 15af088

Please sign in to comment.