Bug Tracker

Modify

Ticket #8828 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

FadeOut FadeIn broken

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

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

comment:1 Changed 2 years ago by timmywil

  • Owner set to devndesign@…
  • Status changed from new to pending

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 2 years ago by devndesign@…

  • Status changed from pending to new

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 2 years ago by timmywil

  • Status changed from new to pending

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 2 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 2 years ago by timmywil

  • Status changed from pending to closed
  • Resolution set to invalid

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 2 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 2 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 2 years ago by timmywil

  • Status changed from closed to reopened
  • Resolution invalid deleted
  • Component changed from unfiled to effects

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

comment:9 Changed 2 years ago by timmywil

  • Status changed from reopened to open

comment:10 Changed 2 years ago by timmywil

  • Priority changed from undecided to low
  • Status changed from open to closed
  • Resolution set to duplicate

comment:11 Changed 2 years ago by timmywil

Duplicate of #9474.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.