jQuery Stop() Bug

View this example with with my applied patch.

This page illustrates an issue with the $.stop() method. If the stop() method is called on an animation, then the element never reverts to it's original state.

To see this behavior in action, hover over the "Menu 1" item and then mouseout before the list finishes it's animation. The menu will now "shrink" back to it's original size. However, since the stop() method doesn't clean up after itself the overflow remains at "hidden". So when the animation stops running the inner list never re-appears. If you allow the menu to open all the way and then mouse away from the menu, the overflow returns to it's original state.

If you reload the page and change the "gotoEnd" argument to "true", the stop() method does revert back to it's original state, but this forces the animation to jump to the full open position--which is not the desired effect.

The "Timed Animation" button is designed to stop() the animation halfway through the first queued animation. Clicking this button is the easiest way to replicate the bug. This animation will incorrectly leave the modifications that jQuery made to the overflow property.

$.stop() arguments: clearQueue:    gotoEnd: