Skip to main content

Bug Tracker

Side navigation

#5466 closed bug (worksforme)

Opened November 07, 2009 02:49AM UTC

Closed November 11, 2009 02:16AM UTC

Image load only fires once in chrome

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

Hi there,

I am loading a image in the background, and only displaying it once it has finished loading. For this, I'm using the jquery.load method. When I specify an image url more than once, the load event only fires the first time in chrome, but it fires every time in firefox and safari.

Here's an example:

http://pastie.org/687480

Try it here:

http://david.kelso.id.au/jqload.html

I'm using jQuery 1.3.2 from google CDN, on Mac 10.6.1, safari 4.0.3, firefox 3.5.4, chrome 4.0.237.0

First jQuery bug report, so let me know if there's any more info needed.

Thanks!

David

Attachments (0)
Change History (1)

Changed November 11, 2009 02:16AM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

There are a couple of strange things there. First is that the element is never attached to the document; I am not sure all browsers support events on detached elements. Second is that you attach the load event *after* creating the element; it's possible that the event fires (for example on a cached image the second time) before it gets to attach the event.

That said, your example consistently worked for me in IE8, Firefox 3.5, and Chrome 3.0.195.32. Since Chrome 4.0 is a beta, you might want to reproduce the problem just using bare DOM events (if possible) and report it there as a Chrome bug.