[Webkit-unassigned] [Bug 15137] onload event fire to soon causing setting incorrect iframe height.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 3 22:41:39 PDT 2007
http://bugs.webkit.org/show_bug.cgi?id=15137
mrowe at apple.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mrowe at apple.com
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
------- Comment #1 from mrowe at apple.com 2007-09-03 22:41 PDT -------
What is happening here is that the onload event for the iframe is firing after
its load has completed but before it's layout has occurred. See
<http://bdash.net.nz/files/iframe-height-test.html> for a simpler example of
that. theIFrame.contentDocument.height is zero until layout has occurred.
Accessing .offsetHeight or .clientHeight triggers the layout to occur, so the
next access of .height has the correct value.
The article you link to is incredibly misleading. It suggests that onload
fires before images have loaded and scripts have executed. This is *not* the
case. It fires after the loads and script execution, but may fire before
layout.
The bug here, IMO, is that accessing theIFrame.contentDocument.height does not
trigger the layout to occur. Hyatt or Mitz will be able to say for sure what
the best solution is here.
--
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the webkit-unassigned
mailing list