Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery callbacks apparently repeat on failure?

I seem to be observing at least one case where a callback function passed to a jQuery effect function will execute repeatedly if there's an error while it's executing.

For example, see this JS Fiddle, featuring the following code:

$('#awesome').fadeOut(400,function () {
    log('fading out...');
    dieInAFire();
});

log appends whatever's passed to it to a div... but dieInAFire doesn't exist. Rather simply stopping execution, however, the anonymous function appears to be getting called over and over, as evidenced by the growing number of appearances of 'fading out...' in the log div.

Is this the expected behavior? If so, why?

like image 456
Weston C Avatar asked Aug 24 '11 23:08

Weston C


1 Answers

It's a known bug. See the report here.

like image 92
user113716 Avatar answered Oct 09 '22 22:10

user113716