Bug 13118 - Safari does not load page in iframe if the frame display is none
Summary: Safari does not load page in iframe if the frame display is none
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: Macintosh PowerPC All
: P2 Critical
Assignee: Nobody
URL: http://www.scottwickham.com/nyl/tabs/...
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-19 09:04 PDT by Scott Wickham
Modified: 2016-09-26 09:28 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Wickham 2007-03-19 09:04:40 PDT
I used both innerHTMl and DOM methods to add an iframe to my page.

document.getElementById('loadiframe').innerHTML  ='<iframe  id="frame1"  src="frame.html"  style="display:none"></iframe>';

If the display was equal to none. Safari refused to load frame.html. Just because it is not displayed doesn't mean it shouldn't be loaded and a full member of the DOM.  

In my specific example frame.html would be loaded and the script in the frame.html would be executed which would then modify the main page. Safari never executes the script, nore does it report a javascript error. It just totally ignores the page unless display is not equal to none.
Comment 1 Geoffrey Garen 2007-03-27 14:19:59 PDT
Works for me with the latest nightly build (available @ nightly.webkit.org). I remember that Anders Carlsson fixed this issue a while back, but I didn't track down the bug #.