Skip to content

Image Lightbox not working on Classic Themes with Gutenberg versions higher than 17.1.x #57370

@liviopv

Description

@liviopv

Description

The Image Lightbox is not working on Classic Themes when using Gutenberg versions higher than 17.1.x. In the backend, the Image Block will present the "Expand on click" option, but in the frontend clicking on the image or in the icon to expand it will do nothing. No error is tracked in the browser console.

Switching to a block theme like TT4 or deactivating Gutenberg fixes the issue.

Step-by-step reproduction instructions

  1. Install a Classic Theme
  2. Install Gutenberg with a version higher than 17.1.x (I tested 17.2, 17.2.3 and 17.3)
  3. Add an image to a page/post
  4. Select the option to "Expand on click"
  5. The image lightbox will not open on click

Screenshots, screen recording, code snippet

Video: https://cldup.com/qvnfo5aGOa.mp4 (bigger than 10MB)

Environment info

  • WordPress 6.4
  • GB 17.1, 17.2, 17.2.3, 17.3
  • Twenty Sixteen and TT4

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[Feature] Script Modules APIRelated to the Script Modules API that adds support for native ES modules and import maps[Type] BugAn existing feature does not function as intended[Type] RegressionRelated to a regression in the latest release

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions