简体   繁体   中英

iFrame Not Loading in Tabs in FireFox

I've been having this weird problem that I thin I am close to solving but would like some input. It relates to this problem here: Firefox and multiple iframes not loading I have 4 iframes loading on a page, each in a separate tab. The tabs are made using Twitter Bootstrap.

Now here comes the really weird part with FireFox. The iframe only works for if the current tab is showing with the iframe. The iframes in the other tabs whose divs are not shown all have javascript errors and do not work. But if I take all the iframes and put them in the same tab that is displaying, they work.

Is there a logical explanation for this?

I recently had an issue very similar to this. From what I found, the "display:none" value of an iframe can cause error in Firefox if used in its declaration. There are a few opposing opinions on this here Setting iFrame CSS to display:none during load but I have found through my research that it's a common problem in Firefox. (edit: another link on this bug -> https://bugzilla.mozilla.org/show_bug.cgi?id=548397 )

That being said, my issues vanished when I realized that not every iframe in a new instance wasn't being loaded in HTML5, but instead HTML4.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM