• Resolved alx359

    (@alx359)


    Just discovered that there’s an issue with lazy-loading <iframes> within <noscript> tags, like in this piece of code from a recaptcha plugin:

    $content .= '<div id="gglcptch_recaptcha_' . $id . '" class="gglcptch_recaptcha"></div>
    <noscript>
    <div style="width: 302px; height: 422px; position: relative;">
    <div style="width: 302px; height: 422px; position: absolute;">
    	<iframe src="https://www.google.com/recaptcha/api/fallback?k=" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"></iframe>
    </div>
    </div>
    </noscript>';

    when the Enable lazyload for embedded videos and iframes. feature is switched on, the iframe in the markup above gets somehow rendered inside the noscript tag, which messes up the layout and functionality of the recaptcha plugin in certain usage scenarios. Switching off the aforementioned Optimole feature workarounds the issue. Also works rewriting the code to use object instead of iframe.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘lazyloading iframes issue’ is closed to new replies.