Skip Navigation

[Resolved] Issue with ligthbox, several close buttons on picture.

This thread is resolved. Here is a description of the problem and solution.

Problem:
The customer reported seeing multiple close buttons for lightbox images, in the WooCommerce archive pages.

Solution:
Shared some custom CSS code that ensures only one lightbox close button is visible, at a time.

Relevant Documentation:
n/a

This support ticket is created 2 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Diego Walter Ricciardi 2 years, 5 months ago.

Assisted by: Waqar.

Author
Posts
#2372017
closebuttons.png

In the woocommerce archive page, after every AJAX action ie: filtering, a close button is added to the product images inside lightbox (so after clicking to expand).
I would say there's a script running after each filter appending a close button to all images, instead of running once for each.

Can be viewed here:
hidden link

Just filter a couple of times and see a close button gets added, until you can have 5-6-7 buttons

#2372319

Hi,

Thank you for contacting us and I'd be happy to assist.

It looks like a conflict with the "Breeze" performance plugin, as there is a script error shown in the browser's console when the AJAX request completes.
( origination from file: /wp-content/plugins/breeze/assets/js/js-front-end/breeze-prefetch-links.min.js )

Can you please test this with the "Breeze" plugin disabled? In case the issue persists, you're welcome to share temporary admin login details, for further troubleshooting.

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2374371

Thank you for sharing these details.

I've noticed that some custom script is included in the archive, which is set to execute with multiple events that are associated with the AJAX calls for the search form and the search results updates.

You can include the following custom CSS code in the archive, to make sure only the first instance of the close button is visible:


#lightbox > .lb-dataContainer.tb-lb-dataContainer {
display:none !important;    
}

#lightbox > .lb-dataContainer.tb-lb-dataContainer:first-of-type {
display:block !important;    
}

#2374631

While not optimal, it is resolved.