Bug Tracker

Opened 4 years ago

Closed 4 years ago

#11987 closed bug (duplicate)

FadeIn function does not execute correctly after stop() call

Reported by: bastian.home@… Owned by:
Priority: low Milestone: None
Component: effects Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

The fadeIn function does not seem to work correctly under certain circumstances.

I've created an example, where the problem can be observed:

http://operator.tuxzone.org/virtualGuitar/example.html

There are two parts which are doing practically the same. The upper one seems buggy, the lower one works correctly. There is a red box that fades in a blue box when the curser is entering, and fades out the box again when the cursor is leaving. The upper one uses the functions fadeIn() and fadeOut() (seems buggy), the lower one uses fadeTo() (works correctly).

If you enter the red div with the mouse, the blue div will start fading in. Leave it while it's still fading in. Now it stops fading in and begins to fade out. If you now reenter it while it's fading out, it will just freeze, although it should again start to fade in. But it doesn't. If you leave it again it will continue fading out and whenever you enter it again before it is completely faded out, it will just freeze.

In the lower example everything works as expected, here I used the fadeTo function with the parameters 0 and 1 for the target opacity.

Here is the code snippet, that is relevant: Buggy:

	function fadeIn1(){
		$("#fadediv1").stop(true).fadeIn(2000);	
	}
	
	function fadeOut1(){
		$("#fadediv1").stop(true).fadeOut(2000);			
	}

Working:

	function fadeIn2(){
		$("#fadediv2").stop(true).fadeTo(2000, 1);	
	}
	
	function fadeOut2(){
		$("#fadediv2").stop(true).fadeTo(2000, 0);			
	}

Change History (4)

comment:1 Changed 4 years ago by anonymous

Example also available at js-fiddle:

http://jsfiddle.net/3CBma/

comment:2 Changed 4 years ago by gnarf

  • Status changed from new to open

Confirm, problem also exists on edge http://jsfiddle.net/3CBma/1/

comment:3 Changed 4 years ago by dmethvin

  • Component changed from unfiled to effects
  • Priority changed from undecided to low

comment:4 Changed 4 years ago by dmethvin

  • Resolution set to duplicate
  • Status changed from open to closed

Duplicate of #10462.

Note: See TracTickets for help on using tickets.