Skip to content

Commit

Permalink
Remove ability to crop image if content only mode (#64838)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj authored Aug 28, 2024
1 parent e1e10ab commit 2c8922e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ export default function Image( {
}, [ isSingleSelected ] );

const canEditImage = id && naturalWidth && naturalHeight && imageEditing;
const allowCrop = isSingleSelected && canEditImage && ! isEditingImage;
const allowCrop =
isSingleSelected &&
canEditImage &&
! isEditingImage &&
! isContentOnlyMode;

function switchToCover() {
replaceBlocks(
Expand Down

0 comments on commit 2c8922e

Please sign in to comment.