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 overlapping transitions with parent x-shows #853

Merged
merged 1 commit into from
Oct 27, 2020

Conversation

calebporzio
Copy link
Collaborator

Before this PR, given the following code:

<div x-data="{show: true}">
  <button @click="show = ! show">Toggle</button>

  <div x-show="show">
    <div x-show.transition="show">
      // Contents
    </div>
  </div>
</div>

If you press the "toggle" button, then press it AGAIN while the "out" transition is still playing, instead of transitioning back in mid-way, the contents would immediately disappear.

This only happens when an x-transition is wrapped by an x-show without a transition.

This PR fixes this case, but rejecting the entire show directive stack at the component level once any transition within it has been cancelled.

@calebporzio calebporzio merged commit 0186da8 into master Oct 27, 2020
@calebporzio calebporzio deleted the fix-nested-transition-overlap branch June 11, 2021 15:36
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.

None yet

1 participant