You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I might be a design decision never to display the lightbox when the image from the Image block is wrapped with a link. However, at the moment, the option is still visible in the editor's UI even when it won't be used on the frontend.
Step-by-step reproduction instructions
Activate the experiment that enables Interactivity API and Behaviors.
Go to the post editor.
Insert an image in the post.
In the advanced settings for the Image block, activate the lightbox behavior.
From the block toolbar select Insert link option.
Choose any option that wraps the image with a link, for example: Media File.
Publish the post.
Navigate to the post on the front end.
Click on the image and observe that the link opens a new page, and the lightbox never shows up.
Screenshots, screen recording, code snippet
View in the editor:
View on the frontend:
Environment info
WordPress 6.2, Gutenberg latest (trunk)
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
The text was updated successfully, but these errors were encountered:
Ok, my first inclination would be to render the Behaviors dropdown inert and add a message stating, "Lightbox will be disabled while the image contains a link."
On the technical side, to do this, we would need to detect the image block's linkDestination to override the UI defined in packages/block-editor/src/hooks/behaviors.js. I'm not sure how to do that, but can begin exploring. Any pointers appreciated!
Description
I might be a design decision never to display the lightbox when the image from the Image block is wrapped with a link. However, at the moment, the option is still visible in the editor's UI even when it won't be used on the frontend.
Step-by-step reproduction instructions
Insert link
option.Media File
.Screenshots, screen recording, code snippet
View in the editor:
View on the frontend:
Environment info
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
The text was updated successfully, but these errors were encountered: