Open jan-usc opened 2 days ago
Hi,
This will turn out to be a CSS issue. iframe-resizer manages to work around most of these, but have a look at this page that details a few ways CSS can trip things up and how to work around them.
https://iframe-resizer.com/content_guidelines/
I’m interested to know how this only affects Chrome, so will take a more detailed look later in the week. It would be very helpful if you could install the latest beta version and turn logging on to enable me to see what is happening.
npm i @iframe-resizer/child@beta
Hi,
thx for your quick reply!
I referenced the beta on the child page and activated logging
seems that under Chrome the calculated size doesnt change when the content of the iframe is shrinked (screenshot1), whereas the size changes if FF (screenshot2)
Looking at those logs, it appears that you’re loading a new page into the iframe. As part of the page setup iframe-resizer sets the height of both the body
and html
elements to auto. It appears that something on your page is overriding this value in Chrome or not allowing another element inside it to shrink.
The interesting bit, is that after the initial size calculation is done, it appears not to be happy with this and checks it another two times, but your page CSS is still reporting that the body
hasn’t downsized.
So my question is how is that height value on body
being set in Chrome?
Yes, I do load a new page into the iframe whenever the selection in the select changes. Unfortunately, the webapp within the iframe is based on a rather old framework, the pages are server-side generated whenever an action occurs in the browser. Not a modern single-page client side js app.
Regarding your question, I'll try to find out, but I need the help of a colleague.
Describe the bug resizing iframe (up- and downsizing) works perfectly on firefox, but seemingly not in chromium browsers
To Reproduce Steps to reproduce the behavior:
Expected behavior iframe downsized also when using chromium browser.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information): n/a
Additional context Add any other context about the problem here.
Any help greatly appreciated!