-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infinite resize (enlarging) loop #594
Comments
@snarfed I "fixed" the issue temporarily by setting the autoResize : false and changing the limit of the iframe height, but I wish it could be differently. |
The most common cause of the is CSS setting a style to be taller than the page, everytime the page resizes, the CSS sizes past the bottome of the page and around we go again. Have you tried using the tolerence option as that can sometimes help. The other thing to try is the different height calculation methods, as this can sometimes help. PostMessage is unlikly to be the issue, as we ignore messages not for iframe resizing. |
good guess! this was indeed the issue. details in metabase/metabase#7903. different height calculation methods didn't help, so i ended up overriding the offending CSS rule. tolerance would probably work too, but the difference in this case is ~150px, which is a bit big to ignore. |
@davidjbradshaw i know it's probably a big request, but if this has happened before, you all might consider adding loop detection to at least prevent the infinite loop in these kinds of cases. just a thought. |
Tolerance didn't work for me (as the different height calculation methods) and we are experiencing the same problem in a similar configuration @snarfed |
Long dead thread but for anyone else who comes across this, I had this same issue with nested iframes growing withoug bound. I was using:
as my settings. Removing the bodyPadding fixed the issue for me. Thanks @davidjbradshaw for your work on this library! |
hi! first off, thank you for iframe-resizer. it's awesome!
i'm seeing an infinite resize loop when i use it with a Metabase embedded dashboard in an iframe.
this is with iframe-resizer 3.5.15. looking at the changelog, the changes since then seem unrelated, but feel free to let me know if you think it might already be fixed. reproduces for me in firefox 60, chrome 66, and safari 11.1.1 on mac os x 10.13.5.
here's the outer page's HTML:
one possible cause is that Metabase itself uses
window.parent.postMessage()
to send messages to the top-level page, so i wonder if iframe-resizer is accidentally handling those. here's an example message payload from Metabase:possibly related: #7, #58, https://stackoverflow.com/questions/48563508
metabase docs that recommend iframe-resizer usage: https://www.metabase.com/docs/latest/administration-guide/13-embedding.html#resizing-dashboards-to-fit-their-content
thanks in advance!
The text was updated successfully, but these errors were encountered: