-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Image block lightbox: setting lightbox on an image makes all following images open in the lightbox #55119
Comments
Thank you for opening this. I can't replicate with 6.4-beta2 and with or without GB 16.7 with the gallery block: images.movI can't with four image blocks either: image.replicate.movPerhaps someone else can replicate cc @artemiomorales |
Thanks for diving in 🙌🏼 |
@artemiomorales @annezazu I see taht sometimes changes to the PHP files are not immediately applied and thus testing appears to be sometimes reliable. I have no idea why, but it seems we are at least in three who had some troubles properly testing. I wouldn't underestimate this, as a solid, reliable development environment is key for proper development and testing. Anyone know who maintaines the wp-env environment and the build process and can be pointed at this issue? |
Description
This can be reproduced also in WordPress core with Gutenberg disabled so is needs to be fixed before the 6.4 release.
Cc @annezazu @bph @mikachan @SiobhyB @karmatosed @hellofromtonya
When a post has more than one Image block, setting one of the image to open in the lightbox makes all following imges open in the lightbox, even if their lightbox setting is disabled.
This is clearly not the expected beheavior.
This filter rund at priority 15:
gutenberg/packages/block-library/src/image/index.php
Line 72 in f04f5c5
The filter is never removed. That means the lightbox markup and view file are added to all the blocks after the first block that has the lightbox enabled.
That also highlights that the lighbox feature has never been tested with more than one image, which is a little surprising.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
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: