generalPage doesn't get proper height in Chrome

We’re building an app that uses the page module to insert a generalPage into Confluence Cloud. So far, the iframe that renders this page has been resized correctly. But one particular customer is now experiencing some serious problems:

Through a screen sharing session and video recordings we could verify that Confluence does not correctly resize the iframe to the full width and height of the parent. This happens in about 90% of the page loads.

Similar issues like this seem to exist for other products as well:

A possible fix

We could verify that the following snippet pasted into the Chrome Console fixes the problem and resizes the frame correctly:

const scrollHeight = document.body.scrollHeight;
AP.resize('100%', `${scrollHeight.toString()}px`);
AP.sizeToParent();

P.S.: This simple snippet is based on a more extensive fix proposed for BitBucket.

Questions

  • Has anyone else noticed this for Confluence Cloud?
  • It seems like there is work going on to fix this. What’s the state of this?

How we setup connect

This is the code that loads the connect client library with sizeToParent set to true.

<script src="https://connect-cdn.atl-paas.net/all.js" data-options="resize:true;sizeToParent:true;margin:false;base:false;hideFooter:true" referrerpolicy="no-referrer"></script>

This is how we setup the ac-content element and initialise our app…

    <body onload="loadScripts();">
        <div class="ac-content">

Additional facts

  • Customer is on macOS 10.15.7 using Chrome 88.0.4324.192.
3 Likes

Hi @MatthiasWagler ,

Thanks for all the details. Ive create an app to reproduce this:

I observe an additional scroll bar so I’ve created https://jira.atlassian.com/browse/CONFCLOUD-72010 to have this fixed.

Regards,
Dugald

2 Likes

Wow… that would be great. It means we don’t have to do add our custom resize fix anymore!

2 Likes

@dmorrow Thanks for your feedback and for providing the reproducible example. I’ll try to find some time later this week to see if the example reflects our current setup.

1 Like

@dmorrow I had a look at the bug description. In our case the iframe is not bigger than the parent but actually it does not adapt at all to the parent when the DOM updates. So the page loooks empty to the customer. I tried create a glitch example that fits our setup and simulates an async DOM update:

But in this case I could not reproduce the bug. :disappointed: But maybe you do spot anything suspicious there.

Thanks for your help!