Skip to content
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

initCallback is never called if iframe doesn't need to be resized yet #213

Closed
lostincomputer opened this issue Jun 3, 2015 · 2 comments
Closed
Labels

Comments

@lostincomputer
Copy link

initCallback is not called if the page doesn't need to be resized initially (isSizeChangeDetected returns false).

Here is a sample page to reproduce the issue with the default iframe-resizer settings

<body style="margin: 0; padding: 0">
<div id="content" style="height: 1px; background-color: red"></div>
<script>
$(function() {
   setTimeout(function() {
    $("#content").height(50);
   }, 1000);
});
</script>
</body>

My workaround right now is to use resizedCallback.

@davidjbradshaw
Copy link
Owner

Have a try with the dev branch and let me know if that fixes things for you.

https://github.com/davidjbradshaw/iframe-resizer/tree/dev/src

Your'll need to uses the uncompressed version, or build the project with grunt.

@lostincomputer
Copy link
Author

It works. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants