Bug Tracker

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#8828 closed bug (duplicate)

FadeOut FadeIn broken

Reported by: devndesign@… Owned by: devndesign@…
Priority: low Milestone: 1.next
Component: effects Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

Description

This code may broke the fadeIn / fadeOut : Html : <div id="one_div">Content...</div>

JQuery Code : $('#one_div').fadeOut('slow',function(){

$(this).fadeIn('slow');

});

Sometime the content stay hidden, even if I invoke this jQuery code again. The bug happens randomly (tested on CR10, FF4, IE9). On Firebug (FF4, firebug 1.7), if the animation succeed I have this in the html panel : <div id="one_div" style="display:block;">Content</div>

If it fail I have this : <div id="one_div" style="display:block;opacity:0;">Content</div> And the content stay hidden.

A "hack can fix this bug" :

$('#devis-c').attr('style',).fadeOut('slow',function(){

$(this).attr('style','display:none').fadeIn('slow');

});

I's a totaly ramdom bug, with a probability of 10% on my website.

This bug is similar to the old closed bug in this ticket : http://bugs.jquery.com/ticket/1052

Change History (11)

comment:1 Changed 9 years ago by timmywil

Owner: set to devndesign@…
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket! Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 9 years ago by devndesign@…

Status: pendingnew

You can test the bug on this website : http://lamaisonduweb2.webgestion.fr Just navigate with the top menu, sometime the box "BESOIN D'UN DEVIS?" on the left stay hidden. line 402 on mdw.js in the source code.

comment:3 Changed 9 years ago by timmywil

Status: newpending

It's difficult to navigate through that much code to narrow down the issue. Please provide a reduced test case so that we can confirm it is an issue with jQuery.

comment:4 Changed 9 years ago by pdjk

you should to call a .stop() at the beginning of your animated functions to prevent them from stepping on one another. adding one before the .hide() on 403 seemed to prevent the bug in my (admittedly hasty) testing.

comment:5 Changed 9 years ago by timmywil

Resolution: invalid
Status: pendingclosed

I believe this is operator error. Please ask for support in the #jquery irc channel or at http://forum.jquery.com/using-jquery. We can reopen if this is an issue with jQuery.

comment:6 Changed 9 years ago by anonymous

Just tell my why this code is bugged: function test() { alert('start'); $('#devis-c').fadeOut('slow',function(){

$(this).fadeIn('slow',function(){

alert('callback');

});

}); }

Sometimes all alerts are ok, sometime, only the start alert and the devis-c stay hidden even if I execute the function again, the callback is not triggered.

comment:7 Changed 9 years ago by anonymous

Edit : the hack dont really work... Can't fix the bug. The final state if it's ok should be like here : http://jsfiddle.net/WMy3B/3/

<div id="devis-c" style="display: block;">

On my website it's sometimes : <div id="devis-c" style="display: block;opacity:0"> fadeOut bug maybe.

comment:8 Changed 9 years ago by timmywil

Component: unfiledeffects
Resolution: invalid
Status: closedreopened

A test case was provided. Looks like stop is somehow interfering with the fadeIn. http://jsfiddle.net/timmywil/WMy3B/10/

comment:9 Changed 9 years ago by timmywil

Status: reopenedopen

comment:10 Changed 8 years ago by timmywil

Priority: undecidedlow
Resolution: duplicate
Status: openclosed

comment:11 Changed 8 years ago by timmywil

Duplicate of #9474.

Note: See TracTickets for help on using tickets.