Bug 141787 - iframe display style set to none => contentDocument is empty
Summary: iframe display style set to none => contentDocument is empty
Status: RESOLVED DUPLICATE of bug 71809
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-16 15:31 UTC by Stevan White
Modified: 2009-05-05 10:27 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stevan White 2007-02-16 15:31:56 UTC
Version:           3.5.5 (using KDE KDE 3.5.5)
Installed from:    Ubuntu Packages
OS:                Linux

If the CSS style display of an iframe is set to none, then the DOM contentDocument member of the iframe object remains null, even though the onload() event fires.

This behaviour is unlike that in Firefox, Opera, and IE6.

I expect the iframe's src to be loaded regardless of whether it is displayed or not, and for its onload() event to fire when the src has loaded.
Comment 1 Stevan White 2007-02-16 15:35:48 UTC
Code to play with:

<iframe style="display: none"
        id="iframe1"
        src="some_external_text_file"
        onload="iframe_loaded();"
        >
</iframe>

<script type="text/javascript">
function iframe_loaded() {
        alert( document.getElementById( "iframe1" ).contentDocument );
}
</script>
Comment 2 Maksim Orlovich 2007-09-08 02:30:15 UTC

*** This bug has been marked as a duplicate of 71809 ***
Comment 3 Stevan White 2009-05-05 10:27:21 UTC
This problem is resolved, as of at least KDE 4.2.2.

Thanks!