Bug Tracker

Modify

Ticket #6772 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

$.slideToggle() & $.hover() animation issues

Reported by: AP Erebus Owned by:
Priority: high Milestone: 1.next
Component: effects Version: 1.4.2
Keywords: slideToggle, hover Cc:
Blocking: Blocked by:

Description

This is an issue I raised on StackOverflow at:  http://stackoverflow.com/questions/3177446/slidetoggle-hover-animation-queue-issue

Basically is that when trying to use slideToggle() with hover() you get the animation queuing. I attempted to remedy this with stop() but this then caused the animation to stop working. The SO post contains a lot more info.

This JSFiddle:  http://jsfiddle.net/SNhky/ contains the code that doesn't work.

I'm using Chrome 6.0.453.1 dev, but this error occurs in IE8 as well.

Change History

comment:1 Changed 3 years ago by addyosmani

  • need changed from Review to Patch
  • Priority set to undecided

I've tested this in Chrome 6.0.472.62 and the behavior is as follows:

Hovering over the item, the animation works fine for the first few attempts but on subsequent hovers it begins to fail to the point where what is slid down is a fraction of the correct height/size. May be a bubbling issue.

Having run the test a few times, it would appear that this behavior is semi-consistent.

Flagging for patch.

comment:2 Changed 3 years ago by snover

  • Priority changed from undecided to high
  • Status changed from new to open
  • Milestone changed from 1.4.3 to 1.5

comment:3 Changed 2 years ago by anonymous

I think this bug occurs where the previous animation is not 100% complete the system believes the original height is a fraction of what it actually is. Only fixes I have found so far are to 1) make sure your animations are very short, so it is more likely the animations complete; 2) make your fadeOut / callback function instant - use hide() instead of slideUp for example

comment:4 Changed 2 years ago by timmywil

  • Status changed from open to closed
  • Resolution set to fixed
  • Milestone set to 1.next

Again, stop(true, true) fixes this issue, but see #8685.

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.