npr / responsiveiframe

Responsive IFrames

Home Page:http://npr.github.com/responsiveiframe/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

With no minimum height, iframe can be invisible if there are rendering quirks

samuelatlarge opened this issue · comments

Due to rendering quirks on a page I'm working on, responsiveiframe is making the height of an iframe 0. It'd be helpful to have a minimum height configuration option.

Interesting idea. Could you submit a patch request, please?

Sorry, I'm not sure how to do that. Here are a few more details if this helps track down the underlying issue:

I have a shell page whose only function is to do a jQuery $.load on another page and apply the contents to the shell page's <body>. The page being called and inserted by $.load contains an iframe.

ResponsiveIframe parent code is called on the page with the iframe, and responsiveiframe child code is called on the page loaded in the iframe. For some strange reason in Firefox and Chrome (but not IE 8 or 9), the page loads the iframe per defined CSS height rules, but disappears a second later because its height is set to 0.

It seems responsiveiframe isn't accurately calculating the length of the internal page. A minimum height configuration option or perhaps making responsiveiframe treat the element's CSS-defined height as its minimum would be a helpful Band-Aid in the meantime.