Iframe-resizer: Resize only goes bigger not smaller

Created on 16 Nov 2018  路  4Comments  路  Source: davidjbradshaw/iframe-resizer

Hello,
I just tried implementing this into my webpage, though it only seems to be working in upscalling not downscalling.

The website is https://www.pz-online.de/zielgruppen/ with the options {log:true, heightCalculationMethod: 'max'}

the way to reproduce this is simple:
just press Startwith everything selected and then click one of the list entries.
The first Start will increase the frame size, the second click will decrease the content but not the frame size.
The log seems to show everything running in both parent and child, but the calculated height is always min the old.

The double size increase works:
This is done by first delesecting everything but the first entry before clicking Start
this increases the size once, then clicking Analyseauswahl in the top right and selecting everything and clicking w盲hlen increases the size once again, which also resizes properly.

Doing it the other way around, first the bigger than the smaller does not resize properly.

Every click is a new pageload, so I don't think that there is any scripts in the child that could mess with the size calculations.

I have a strong feeling that I missed some option but I read through the readme and could not find anything.

Sincerely

Most helpful comment

I had the same issue and just got it resolved. For some reason putting the doctype <!DOCTYPE html> as the first line in the iframe fixed it.

All 4 comments

Replace:
<script>iFrameResize({log:true, heightCalculationMethod: 'max'}, '#zgIframe')</script>
With:
<script>(function(){$('#zgIframe').iFrameResize({log: true, checkOrigin: false});})();</script>

I did that, but it does not seem to change anything, still the same behaviour of going bigger but not smaller

Check your css, that is where the issue will be

I had the same issue and just got it resolved. For some reason putting the doctype <!DOCTYPE html> as the first line in the iframe fixed it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

premedios picture premedios  路  5Comments

ranand picture ranand  路  4Comments

dfelix86 picture dfelix86  路  4Comments

speedpacer picture speedpacer  路  6Comments

mouse0270 picture mouse0270  路  6Comments