Bug 129307 - [test case]JavaScript: image dimensions not immediately readable
Summary: [test case]JavaScript: image dimensions not immediately readable
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 130845 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-17 14:44 UTC by jordan.osete
Modified: 2008-08-27 19:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A simple testcase (2.90 KB, text/html)
2006-06-17 15:04 UTC, jordan.osete
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jordan.osete 2006-06-17 14:44:48 UTC
Version:           3.5.2 (using KDE 3.5.3, Debian Package 4:3.5.3-1 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15-1-k7

Hello, when you want to read the dimensions of an image using script, those dimensions are not immediately readeable, but you must wait like one second or so after the image has finished loading.
  <img src="animage.jpg" onload="alert(this.width+' '+this.height);" />
This will display an alert with "0 0" instead of the true dimensions of the image.
Comment 1 jordan.osete 2006-06-17 15:04:28 UTC
Created attachment 16651 [details]
A simple testcase

As you see, both the onload of the image and the onload of the body display
wrong dimensions, but if you later click on the image or on the link, it will
show the right ones (160*120).
Comment 2 Andreas Kling 2006-07-15 07:35:12 UTC
*** Bug 130845 has been marked as a duplicate of this bug. ***
Comment 3 Maksim Orlovich 2008-08-26 20:43:09 UTC
I think I just figured out a fix for this based on a different report