Skip to main content

Bug Tracker

Side navigation

#8828 closed bug (duplicate)

Opened April 08, 2011 04:36PM UTC

Closed June 14, 2011 01:57PM UTC

Last modified June 14, 2011 01:57PM UTC

FadeOut FadeIn broken

Reported by: devndesign@android-addict.com Owned by: devndesign@android-addict.com
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

Attachments (0)
Change History (11)

Changed April 08, 2011 04:48PM UTC by timmywil comment:1

owner: → devndesign@android-addict.com
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.

Changed April 08, 2011 05:23PM UTC by devndesign@android-addict.com comment:2

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.

Changed April 08, 2011 05:26PM UTC by timmywil comment:3

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.

Changed April 08, 2011 09:44PM UTC by pdjk comment:4

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.

Changed April 08, 2011 10:06PM UTC by timmywil comment:5

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.

Changed April 11, 2011 04:27PM UTC by anonymous comment:6

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.

Changed April 11, 2011 04:43PM UTC by anonymous comment:7

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.

Changed April 11, 2011 05:53PM UTC by timmywil comment:8

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/

Changed April 11, 2011 05:53PM UTC by timmywil comment:9

status: reopenedopen

Changed June 14, 2011 01:57PM UTC by timmywil comment:10

priority: undecidedlow
resolution: → duplicate
status: openclosed

Changed June 14, 2011 01:57PM UTC by timmywil comment:11

Duplicate of #9474.