Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit "design" controls from Image block toolbar while in write mode #66880

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from
5 changes: 3 additions & 2 deletions packages/block-library/src/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ export default function Image( {
isSingleSelected &&
canEditImage &&
! isEditingImage &&
! isContentOnlyMode;
hasNonContentControls;

function switchToCover() {
replaceBlocks(
Expand Down Expand Up @@ -702,7 +702,8 @@ export default function Image( {
! lockHrefControls &&
! lockUrlControls;

const showCoverControls = isSingleSelected && canInsertCover;
const showCoverControls =
isSingleSelected && canInsertCover && hasNonContentControls;

const showBlockControls = showUrlInput || allowCrop || showCoverControls;

Expand Down
Loading