Side navigation
#10462 closed bug (notabug)
Opened October 09, 2011 08:53PM UTC
Closed January 26, 2013 09:55PM UTC
animate with stop calls in succession react synchronously to asynchronous actions
Reported by: | timmywil | Owned by: | fracmak2 |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | effects | Version: | 1.6.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
calling .stop().fadeIn().stop().fadeOut().stop().fadeIn() does not lead to a fadeIn
Attachments (0)
Change History (6)
Changed October 09, 2011 08:53PM UTC by comment:1
component: | unfiled → effects |
---|---|
milestone: | None → 1.next |
priority: | undecided → low |
status: | new → open |
Changed October 15, 2012 08:39PM UTC by comment:2
owner: | → fracmak2 |
---|---|
status: | open → assigned |
Changed October 15, 2012 09:41PM UTC by comment:4
_comment0: | The underlying issue has to do with an isHidden() call within animate. When an element is set to display: block, and opacity: 0;, the isHidden() call returns false, so fadeIn() calls resolve immediately because they believe they are done. \ \ I've boiled down the test to a new jsfiddle that more accurately represents the issue. \ \ http://jsfiddle.net/fracmak/4WhBL/24/ \ \ By calling stop(true), the state of the element is set into a partially visible state according to the animate function because display is set to block, but opacity never gets changed off of 0. → 1350337333060622 |
---|
The underlying issue has to do with an isHidden() call within animate. When an element is set to display: block, and opacity: 0;, the isHidden() call returns false, so fadeIn() calls resolve immediately because it believes it is done.
I've boiled down the test to a new jsfiddle that more accurately represents the issue.
http://jsfiddle.net/fracmak/4WhBL/24/
By calling stop(true), the state of the element is set into a partially visible state according to the animate function because display is set to block, but opacity never gets changed off of 0.
Changed October 15, 2012 09:47PM UTC by comment:5
On a side note, fadeTo probably shouldn't be mixed with fadeIn/fadeOut because the fadeTo(1000, 0).fadeIn(1000) doesn't work
Changed January 26, 2013 09:55PM UTC by comment:6
resolution: | → notabug |
---|---|
status: | assigned → closed |
This just seems a result of fade{In,Out}
monkeying with the display
property as part of their action and not using goToEnd
. So although it's unfortunate I don't think it's wrong. If someone wants to propose a solution, great.