Skip to content

Image Cropping via Block Toolbar doesn't work when Image is a Link (cannot drag) #60081

@MadtownLems

Description

@MadtownLems

Description

When an Image block has a link set (whether custom URL or to Media File), the Block Toolbar's cropping tools don't work as expected. You cannot drag them to crop to a desired area. (though the Zoom does work). Video attached.

I have confirmed this behavior on 6.4.3 & 6.5-RC-3 (with and without Gutenberg 17.9)

Step-by-step reproduction instructions

  1. Insert an Image Block
  2. Make the image link to something (this may or may not be the case by default, depending on your value of 'image_default_link_type' in wp_options
  3. Try to crop it using the toolbar, making sure to try dragging to find a different center point.

Note that you cannot drag the cropper.

  1. Remove the link and try to crop again.
  2. See that you can now crop as expected.

Screenshots, screen recording, code snippet

video1077925610.mp4

Environment info

WP 6.4.3 and 6.5-RC-3. With and without Gutenberg 17.9. Twenty Twenty Four Theme (among others)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] ImageAffects the Image Block[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions