iframe-resizer icon indicating copy to clipboard operation
iframe-resizer copied to clipboard

The size of an iframe keeps increasing when using vh units for elements inside the iframe

Open lelekaspb opened this issue 2 years ago • 12 comments

Describe the bug I have a page I need to embed with iframe. This page has a hero picture that takes up entire viewport (100vw and 100vh) plus the rest of the content that is dynamic and therefore changes it's height. The 100vw value behaves fine, however, 100vh break the page with embedded iframe. Namely, the height of the page endlessly while zooming in the picture. I saw that previous issues recommended removing unnecessary vh and % units, but in my case they are necessary.

To Reproduce Set height of a section on the child page to 100vh

Expected behavior I would expect vh units work inside the iframe since this is now so popular and widely used.

Desktop (please complete the following information): I have seen the same behavior in Chrome and Firefox

lelekaspb avatar May 15 '22 16:05 lelekaspb

If you find a fix for this, I would welcome a PR

davidjbradshaw avatar Jul 08 '22 21:07 davidjbradshaw