Showing posts with label Development. Show all posts
Showing posts with label Development. Show all posts

Thursday, July 7, 2022

Bad iframe-resizer Attribute Effects

 I have a site that uses iframe-resizer.  After some code clean-up, every iframe on the app broke in seven different ways. Practically, this was the worst on pages that had infinite scroll or similar events triggered as the page moved. The resizer was triggering a scroll event which was triggering loading which was triggering more scrolling! To make matters worse, the scroll event handle was either non-existent or it was from jquery, and it was absolutely no help.

In the end, we had configured the attributes on the iframe tag incorrectly.  The clean-up had caused them all to be null when compiled into the app, so they never got rendered properly. This didn't show up as null in the final HTML, and there were no helpful errors to guide us. It took a long time to root out.

As you modify a system with iframe-resizer and everything goes to hell, make sure any changes to the iframe tag attributes or configuration is actually getting compiled down properly still. It can save a world of headache.