Summary: | testcase - offsetWidth returns wrong value in the moment of the onload event when document is loaded in a frame | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Hatto Von Hatzfeld <hatto> |
Component: | khtml | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aiacovitti, finex, maksim |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Hatto Von Hatzfeld
2006-11-29 23:59:43 UTC
The problem occurs only WHILE the document is being loaded into the frame or when the onload event is being evaluated. Afterwards these properties show correct values. This is a real problem for web designers who want to adjust their pages to the window with using Javascript. Now I have improved the test case. You can see that an additional resize event is been fired, although this "resizing" is caused only by the rendering process. I still do not see any reason why in this case there is a difference between frames and top windows. Well, the frame gets loaded and then positionned, etc. Perhaps we're resizing it twice or something I think the simplest solution would be to delay the onload event until the last change (to size and/or position) has been made. It seems to me that other browsers (e.g. Firefox) do it that way. Perhaps. Unfortunately nothing related to the load event is simple... Also, imagine if the frame is with display:none. It should be loaded, no? (KHTML currently messes that up for iframes, but I have a mega-patch to fix it, which is tricky due to 4.0 stabilization period..) I've just tried the testcase with konqueror trunk. when the page is loaded the width values on both frames are the same. If I click to one of the two "Test this page in a frameset" when the page is re-loaded the first value is smaller (on that frame). It seems fixed now (tested with KDE 4.11.4) |