Bug 106330 - onload handler does not fire for animated images
Summary: onload handler does not fire for animated images
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: 3.5
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-26 10:55 UTC by Daniel
Modified: 2012-06-19 17:55 UTC (History)
3 users (show)

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 Daniel 2005-05-26 10:55:20 UTC
Version:            (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Animated GIFs never generate an "OnLoad" event.

With a static image, this code will show the dialog:
<html><body>
<img src="static.gif" onload="alert('done')">
</body></html>

With a dynamic image, the dialog never happens:
<html><body>
<img src="dynamic.gif" onload="alert('done')">
</body></html>

The problem also occurs if the image object is created manually with JavaScript:

img = new Image();
img.src = "dynamic.gif";
img.onload = function() { alert('done'); };
Comment 1 Philip Rodrigues 2006-09-02 22:32:05 UTC
Confirmed with 3.5 SVN r575787
Comment 2 Allan Sandfeld 2007-05-23 11:42:18 UTC
It appears it will fire in konqueror if animations are disabled, or set to only show one loop. 

Other browsers fire onload once for every loop of the animations.

I have a patch to fix it.
Comment 3 FiNeX 2008-04-06 19:40:12 UTC
It seems to be fixed on KDE 4: The "onload" event is fired one time (probably when the image is loaded).

Personally I prefer that the event is loaded only one time, not at each loop :)
Comment 4 Janek Bevendorff 2012-06-19 17:55:19 UTC
Closing as fixed as of comment #3.