Skip to content
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

Fix didTransitionOut not being called reliably #105

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jacojoubert
Copy link

This fixes an issue where if the transition out initiates occurs before transition in is finished, the didTransitionOut hook is not called because the modifier is not marked as installed. This improves the animation display with quick clicks and reliability of the hooks firing.

@SergeAstapov
Copy link
Collaborator

@jacojoubert could you please add a reproduction test case to illustrate the change fixes the issue?

@jacojoubert
Copy link
Author

@SergeAstapov I have added a test and also fixed my fix.

@jacojoubert
Copy link
Author

jacojoubert commented Sep 24, 2022

It looks like the tests are behaving weirdly. I am not sure these this.didTransitionOut.notCalled calls are doing anything, because if you actually replace the this.didTransitionIn = spy(); line with a normal function you will see they are indeed being called. In fact, they should be called.

I did not modify these these, but why should probably be updated to use steps instead and drop sinon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants