Erich
Erich

Reputation: 15

iframe-resizer: cannot disable autoResize

I'm using https://github.com/davidjbradshaw/iframe-resizer and I want to disable iFrame height auto-resize.

I added autoResize:false, but it doesn't work: when I resize window width, iFrame height changes.

This is my code:

<iframe id="myIFrame" frameborder="0" height="940" scrolling="no" width="100%"
 src="http://example.com"></iframe>
<script type="text/javascript" src="js/iframeResizer.js"></script>
<script>iFrameResize({log:true, autoResize: false},'#myIFrame');</script>

What am I doing wrong?

Thanks

Upvotes: 0

Views: 1138

Answers (2)

David Bradshaw
David Bradshaw

Reputation: 13097

Yep this was a bug that is now fixed.

Upvotes: 1

David Bradshaw
David Bradshaw

Reputation: 13097

That looks like a bug, try setting resizeFrom to 'child' and see if that fixes it. If it does raise a bug on GitHub.

Upvotes: 0

Related Questions