davidjbradshaw / iframe-resizer

Keep iFrames sized to their content.
https://iframe-resizer.com
Other
6.65k stars 981 forks source link

How can I use "autoResize" option dynamically. It's not working as expected. #1170

Closed masihurgmail closed 3 months ago

masihurgmail commented 1 year ago

How can I use "autoResize" option dynamically.

On my website I am using Modal, I need to be stop autoResize in case of Modal open. When pass autoResize: false directly in the option then it will stop auto resize for other event as well. I need to be stop autoResize only if Modal is being open, Then set it again true after close the modal.

masihurgmail commented 1 year ago

Hi,

I am using below code in our forum JS file to prevent auto resizing, when open a model, and again enable it after close the modal.

image

But it's didn't set as false.

I have prepared a screencast for the refrence.

URL: https://www.loom.com/share/987391376aa0405b81011e8498a6775a?sid=7bf7ddfe-0d0b-4bfd-9a4f-c4030b99227b

Also I tried to use latest library as well, but getting same error.

Please check and provide a solution for it.

masihurgmail commented 1 year ago

Hi,

I am still waiting but didn't get any response.

davidjbradshaw commented 3 months ago

There is an option in the Child Page API to turn this on and off.

https://iframe-resizer.com/api/child/#autoresizebool