• Resolved yvett

    (@yvett)


    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]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support CookieYes Team

    (@cookieyesteam)

    Hi yvett,

    Thank you for reporting this issue.

    The behaviour you described occurs because the embed is inside a container with display: none;, which causes its width and height to be 0. As a result, the script in /cookie-law-info/lite/frontend/js/script.js prevents it from loading.

    This check is in place to avoid unnecessary processing of hidden elements, but we understand that it affects embeds inside components like collapses, modals, or tabs. We are reviewing alternative approaches to ensure embeds load correctly when they become visible.

    We appreciate your patience and will keep you updated on a fix.

    Let us know if you have any questions!

    Plugin Support Nick

    (@nickcysupport)

    Hi yvett,

    This thread has been inactive for a bit, so we are going to mark it as Resolved now. Please feel free to open a new thread or follow-up if you have any further questions or still need help.

    Thread Starter yvett

    (@yvett)

    Is there any update on this issue?

    Thank you in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Bug: overlay JavaScript not working when embed is initially hidden’ is closed to new replies.