Iframes being improperly resized

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #312124
    Trevor Rundell
    Guest

    We’re seeing that an iframe based widget installed on sites with the Emmet theme are not functioning properly. It seems there is a function within Emmet that gets called every time the window resizes…

    
    function ifraimeResize() {
        $('iframe').each(function () {
            var parentWidth = $(this).parent().width();
            var thisWidth = $(this).attr('width');
            var thisHeight = $(this).attr('height');
            $(this).css('width', parentWidth);
            var newHeight = thisHeight * parentWidth / thisWidth;
            $(this).css('height', newHeight);
        });
    }
    

    In our case, this has the effect of making our iframe invisible. Is there any reason why this function needs to resize *all* iframes on the page? Is there a way to make it more targeted so that it doesn’t conflict with other widgets that are in use?

    #312816
    J. Davis
    Keymaster

    Hi Trevor,

    Could you specify the plugins/widgets you use and way to replicate the issue? We’ll test it first.
    Also you can submit request providing admin access to your WordPress and we’ll check it right at your website.

    Best regards,
    John

    #313442
    Antonio
    Guest

    Hi John

    In this specific case the plugin is Drift Live Chat, but looking function all iframes are trasformed, so potentially all plugins that use iframes or all manually scripted iframes are affected to this bug.

    Renew Trevor question. Is there any reason why this function needs to resize *all* iframes on the page? Can you make the function more targeted?

    #320592
    J. Davis
    Keymaster

    Hi Antonio,

    Could you submit a request providing admin access to your WordPress so that I could test it as iframe scripts I’ve tried were loading perfectly with Emmet theme.

    Best regards,
    John

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.