Dynamic content macro stopped to render correctly when iframe width is 100%

We are doing dynamic content macro with ‘inline’ output type and 100% width (it should wrap all the content inside). About 2 months ago something was broken in the page layout and now the actual width is always limited by 300px. Does anyone know how to workaround it?

Some details

  1. We use AP.resize(‘100%’, '30px’) to update iframe size
  2. 'resize:false’ option is enabled
1 Like

Hi @nnmatveev

Changing the outputType in atlassian-connect.json file to

"outputType": "block",

solves this problem for me.

Regards

1 Like

Hi @lutz, it doesn’t work for us - we need “outputType” to be “inline” in our case.

Try changing your AP.resize call to the following:
AP.resize(document.getElementById(‘content’).getBoundingClientRect().width, ‘30px’);

  • instead of specifying 100%.

I’d be worried about relying on the browser to detect the width of content cross domain.

Hi,
I know this is an old post, but I am trying to write a Dynamic macro that has varying width of the output. I am too finding that the iframe width is always 300px.
I can use the AP.resize() function to set the size to something different.
What I want to find out is what is the actual rendered width of my macro after the rendering is complete, I can’t seem to find this out?
Is there a method or recommended way to calculate the real width of my macro output and set the iframe to match it? I have been tearing my hair out in the last few days trying to overcome this issue.
Thanks
Chris