Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-77530

@atlaskit/embedded-confluence resizes indefinitely when an atl.general iframe calls AP.resize

XMLWordPrintable

      Issue Summary

      The ViewPage component from the atlaskit/embedded-confluence resizes to an infinite height when it’s embedding a page that includes a connect add-on that is using the connect atl.general iframe and calls the AP.resize function and the parent product passed in isHeightSetFromContent={true} to Embedded Pages.

      From the postMessage analyzer we can see that the embedded Confluence is calling a postMessage event called “contentSize” thousands of times in this case, which is causing the resizing.

      This issue only occurs when the iframe resize height is greater than 58px. When we use window.AP.resize('100%', '58px'), the issue does not show up.

      Steps to Reproduce

      1. Have a page that uses embedded-confluence.
      2. In the browser console, find a frame that uses the atl.general iframe. 
      3. In the console, run window.AP.resize("100%", "500px")

      Expected Results

      The iframe resizes correctly.

      Actual Results

      The following event to be triggered forever

      {type: 'contentSize', height: 56613, width: 1016}
      

      Workaround

      Disable this feature and not pass the isHeightSetFromContent prop to Embedded Pages

              Unassigned Unassigned
              jrichards@atlassian.com James Richards
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: