Skip to content

Commit

Permalink
Allow replace operation on empty default block in Zoom Out (#68026)
Browse files Browse the repository at this point in the history
* Allow replace operation on empty default block in Zoom Out

* Remove operation type from conditional check

Co-authored-by: getdave <[email protected]>
Co-authored-by: draganescu <[email protected]>
  • Loading branch information
3 people authored Dec 16, 2024
1 parent bce0a50 commit 37da337
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,14 @@ export default function useBlockDropZone( {
const [ targetIndex, operation, nearestSide ] =
dropTargetPosition;

if ( isZoomOut() && operation !== 'insert' ) {
const isTargetIndexEmptyDefaultBlock =
blocksData[ targetIndex ]?.isUnmodifiedDefaultBlock;

if (
isZoomOut() &&
! isTargetIndexEmptyDefaultBlock &&
operation !== 'insert'
) {
return;
}

Expand Down

1 comment on commit 37da337

@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 37da337.
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/12357660570
📝 Reported issues:

Please sign in to comment.