Skip to content

Conversation

@markijbema
Copy link
Contributor

This way it doesn't end when some random element elsewhere on the page has an ending transition.

It must be noted that this is not a complete fix. If you have multiple transitions on the element, it still ends when the first ends.

I ran into this not working (the transition ends almost immediately, because some unrelated transition ends). This fixes it for me, but I was wondering whether this cornercase was considered, and whether the other cornercase (multiple transitions) was considered.

I think it's very hard to get this correct, and think it might be better to make the timeout explicit, or at least allow to set it explicit, and fall back to this behaviour. But I'm really interested in feedback on this one.

This way it doesn't end when some random element elsewhere on the page has an ending transition.

It must be noted that this is not a complete fix. If you have multiple transitions on the element, it still ends when the first ends.

I ran into this not working (the transition ends almost immediately, because some unrelated transition ends). This fixes it for me, but I was wondering whether this cornercase was considered, and whether the other cornercase (multiple transitions) was considered.

I think it's very hard to get this correct, and think it might be better to make the timeout explicit, or at least allow to set it explicit, and fall back to this behaviour. But I'm really interested in feedback on this one.
@sophiebits
Copy link
Collaborator

This agrees with what @ide suggested in #699 (edit: #669).

@markijbema
Copy link
Contributor Author

Ah yes, #669 though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing e argument here?

@plievone
Copy link
Contributor

Note that endListener can also be called immediately without arguments if CSS transitions are not supported: https://github.com/facebook/react/blob/5476f91/src/addons/transitions/ReactTransitionEvents.js#L77-L79

@sophiebits
Copy link
Collaborator

@markijbema Can you add the missing e argument and make sure the code works as intended? Guessing this didn't get tested properly because it should have thrown a ReferenceError as it is now.

@markijbema
Copy link
Contributor Author

Hey Ben,

You're right that I didn't test this PR adequately. I extracted it from some internal fiddling around. Unfortunately I don't have a working setup at the moment to develop on react itself. I believe these two changes should fix both comments, but as said, I cannot currently test it.

@zpao
Copy link
Member

zpao commented Aug 13, 2014

@chenglou - you've been looking at this transition stuff, can you tell if this is still needed?

@sophiebits
Copy link
Collaborator

I believe this is still correct.

@kossnocorp
Copy link

👍

@zpao
Copy link
Member

zpao commented Sep 10, 2014

And I'm finally coming back around to this, sorry!

@markijbema Could you sign the CLA? https://code.facebook.com/cla. Then this should be good to go.

@markijbema
Copy link
Contributor Author

Done.

zpao added a commit that referenced this pull request Sep 13, 2014
Only stop if the transition on this element ended
@zpao zpao merged commit 21f6019 into facebook:master Sep 13, 2014
@zpao
Copy link
Member

zpao commented Sep 13, 2014

Oy, that took too long, but it's in. Thanks for your infinite patience!

@markijbema
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants