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
{{ message }}
Repository navigation
Image block lightbox: setting lightbox on an image makes all following images open in the lightbox #55119
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.
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
Create a post.
Add four image blocks.
Set only the second image block to open the image in the lightbox.
Publish annd view the front end.
Obzerv the first image has no lightbox enabled.
Observe the second image has the lightbox enabled, as expected.
Observe the third image has the lightbox enabled: wrong.
Observe the fourth image has the lightbox enabled: wrong.
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.
@annezazu I was unable to reproduce this in GB 16.7 at first, but after restarting my dev environment and rebuilding Gutenberg, I was able to see the issue, which is probably a reason this was missed.
I can't replicate with 6.4-beta2 and with or without GB 16.7 with the gallery block ... I can't with four image blocks either:
I was unable to reproduce this in GB 16.7 at first, but after restarting my dev environment and rebuilding Gutenberg, I was able to see the issue, which is probably a reason this was missed.
@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?
Activity
annezazu commentedon Oct 6, 2023
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.mov
I can't with four image blocks either:
image.replicate.mov
Perhaps someone else can replicate cc @artemiomorales
artemiomorales commentedon Oct 6, 2023
Thanks for catching this @afercia 🙏
@annezazu I was unable to reproduce this in GB 16.7 at first, but after restarting my dev environment and rebuilding Gutenberg, I was able to see the issue, which is probably a reason this was missed.
annezazu commentedon Oct 7, 2023
Thanks for diving in 🙌🏼
afercia commentedon Oct 9, 2023
@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?