Lazy iframe uses old height and cuts off content
by folkstyler - 7/31/13 2:01 PM
I'm developing a web app and have run across a bump on the native web browser on a tablet running Android 4.1.1. No idea if it's a more widespread issue as I'm low on testing devices.
For simplicity's sake, consider the following:
There is a page that contains another in an iframe. The only starting content on the child page is two buttons. Pressing the first button will reveal a div which was previously hidden. Once visibly, pressing that button will hide the div again. The same goes for the second button for a second div.
Here's what it does (and what you would expect):
If the first div's contents are too large for the iframe, the iframe realizes this and it gives itself a scrollbar when the div is revealed. After hiding it, the iframe realizes it doesn't need to be scrollable anymore and the page is seemingly back where it started.
Here's what it does and what the problem is:
After opening and closing the div mentioned above, you click the second button to reveal the second div BUT the content of the second div is even bigger than the first and now the iframe only scrolls to where the content from the first div stopped. =[
Any help would be much appreciated as I've been pulling my hair out over this for a while.