-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange issue when then()-chaining nested elements #51
Comments
I can confirm that changing the I don't understand exactly why an empty duration causes this issue when a duration of If you agree with my suggestion above, let me know and I'll be happy to prepare a pull request. Thanks! |
FYI, I now believe the problem here is that the 'transitionend' event bubbles up (nobody ever calls stopPropagation), so that if a child's animation ends after a parent's animation has begun, the parent's end() callbacks will be prematurely called. I have a fix locally but it requires messing with the dependencies in a rather ugly way. |
BTW should I prepare a pull request based on master or gh-pages? It seems that gh-pages hasn't been updated in a while; example 13 in the docs doesn't seem to work in master. |
Hi,
I have discovered an issue where then()-chaining does not appear to work correctly. I am trying to chain four animations of two elements (el1 and el2), like so: A(el1) -> B(el2) -> C(el2) -> D(el1). The issue seems to appear ONLY when el2 is a descendant of el1 in the DOM (or perhaps vice versa?). When el1 and el2 are siblings in the DOM tree, it works fine.
When the issue does appear, it seems to take the form of a zero-length animation, and/or the then() callback not occurring.
I tried to create a minimal example. I was able to demonstrate the issue in the master branch, but NOT in the gh-pages branch.
To see it, load up this url:
https://rawgit.com/abliss/move.js/9e0f17e8a2711cc35ce3117f8f32aa76c9d791cb/examples/docs.html
and scroll down to the last example, number 13.
When the checkbox is clear, el2 is a sibling of el1, and the chain of four animations works as intended.
When the checkbox is checked, el2 is a child of el1, and the fourth animation gets skipped (i.e. has duration 0).
I suspect the issue has something to do with the transition-end callback, reset(), and inheritance -- but I'm having a hard time nailing it down exactly.
Again, using the version of build.js that's deployed in the gh-pages branch, this issue does NOT seem to appear.
Please let me know if you have any insight, or if I'm trying to do something that's not supported.
Thanks!
The text was updated successfully, but these errors were encountered: