Skip to main content

Bug Tracker

Side navigation

#4503 closed bug (wontfix)

Opened April 08, 2009 02:42AM UTC

Closed April 11, 2009 02:53PM UTC

in IE6 load handler for img element is called many times for animated gifs

Reported by: jdavidn Owned by:
Priority: major Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

If a DOM img element is assigned a 'load' callback function and if subsequently that img is loaded with an animated gif then the load function is called infinitely many times in IE 6 whenever the animated gif repeats its animation cycle. This unexpected behavior does not exist in FireFox.

I have not tested it with IE7.

I have included a sample html page that demonstrates this bug.

Attachments (1)
  • animated-gif-bug.zip (37.1 KB) - added by jdavidn April 08, 2009 02:44AM UTC.

    unzip file and open loads-animated.html in IE 6 to see bug

Change History (1)

Changed April 11, 2009 02:53PM UTC by dmethvin comment:1

resolution: → wontfix
status: newclosed

This definitely seems like a long-standing browser bug; here's a related issue from 2005:

http://bytes.com/groups/javascript/150332-problem-image-onload-event-firing-too-early-ie

It doesn't seem like something jQuery could easily fix, since for instance you might change the src attribute and want the load event to fire several times. You could use

.one()
or unbind the load event when you've determined that the image has correctly loaded.