Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7823 closed bug (duplicate)

load event fires too soon

Reported by: rasmus@… Owned by:
Priority: low Milestone: 1.6
Component: manipulation Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

Example:

        $('<img src="/images/test.jpg"/>').load(function(){
          $(this).hide().show('slow');
        })

This does not actually work - because the event may fire when the image has loaded, but in Firefox (3.6.13) that does not mean the image has actually been displayed, just that it's in-memory. In other words, the width and height aren't known yet.

It seems like some special handling is required for images here for this function to be truly useful - while this event will tell you when the image has been loading, that is typically besides the point. What you usually need to know is when the image is actually loaded and ready for you to manipulate.

Change History (2)

comment:1 Changed 9 years ago by jitter

Component: unfiledmanipulation
Priority: undecidedlow
Resolution: duplicate
Status: newclosed

comment:2 Changed 9 years ago by jitter

Duplicate of #7757.

Note: See TracTickets for help on using tickets.