Bug: overlay JavaScript not working when embed is initially hidden
-
Hi there,
I’m reporting an issue where the overlay JavaScript does not work properly when an embed is inside a container with
display: none;. This commonly occurs when the embed is within components like a collapse, modal, tabs, or similar elements.For example, the overlay functions correctly on this page (do not accept the cookie consent):
https://www.hofvantwente.nl/direct-regelen/belastingen-en-subsidies/belastingen/bezwaar-maken-belasting/However, on this page, when you expand the collapse items, the embeds are missing entirely:
https://www.hofvantwente.nl/direct-regelen/levensgebeurtenissen/trouwen/trouwambtenaren/39158/I traced the issue to
/cookie-law-info/lite/frontend/js/script.js, specifically in the_ckyAddPlaceholder(htmlElm, uniqueID)function. This condition causes an early return:if ( offsetWidth === 0 || offsetHeight === 0 ) return;I’m unsure why this check is included, but a different approach would be preferable to ensure the embeds load correctly. Please let me know if a fix can be provided.
Thanks!
Yvette
The page I need help with: [log in to see the link]
The topic ‘Bug: overlay JavaScript not working when embed is initially hidden’ is closed to new replies.