thou the height and width are specified then also the content of the iframe tag is not displayed in the same size of the main content. If you go to the bottom and view all comments of a product, you will see a popup and the iframe grows to make the complete popup visible. Using iframe tag the content inside the tag is displayed with a default size if the height and width are not specified. Size of the iframe grows as content adds to it. My problem is with the content iframe element. Underneath the header, I have a fixed width iframe that can grow in height, but is fixed on the left and immediately under the header.
For my code I determined the max of bottom of the popup element and the page and used that as height.īingo!! That actually worked for me. From the above code, I have a header that has a minimum width and can grow as the browser window grows or shrinks in width. I don't know why but same was not happening for height. so this was the source of my Dancing UI problem. However, I observed that right edge of every element was being determined and max of it is being communicated as width. Even the comment by the developer of that code says the same.
_computeContentSize function looks somewhat complicated but works same as the jquery code I was using. So rather than fixing the issue, Facebook has renamed the method to FB.tAutoGrow() that better describes the behavior :(.Īnyways, I thought of looking at the implementation done by Facebook guys. However, the FB.tAutoResize() method works in a way that the height of iframe only grows and never shrinks. Everything depends on you Just throw all the problems away and you will cope with it Have much fun This game represents you various objects, creatures, or elements that can be added to the world, and the order in which you tap them influences how they grow and change their environment is it. Facebook script in the parent window listens to the message and sets the size of iframe. Just use different objects and build your own park. Now parent site is showed as referer in iframed site, but i want to first site in iframe was used as referer to redirected one. $('body').height() solved the issue of auto grow but it stopped growingĮven when there was an absolutely positioned light-box popup :(.įacebook has provided a method to the applications for starting a timer that monitors the size of the content in the iframe and communicate it to the parent window. I use HTML5 sandbox to prevent iframe breaks to main site. Now, every time $(document).height() returns those 30 px added and I was adding 30 more :(.