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

Transition with mode="in-out" does not remove old element when no other element to transition "in" is present #3104

Closed
rashfael opened this issue Jan 26, 2021 · 1 comment · Fixed by #3109
Labels
🐞 bug Something isn't working scope: transition

Comments

@rashfael
Copy link

Version

3.0.5

Reproduction link

https://jsfiddle.net/5j9hmL70/

Steps to reproduce

  1. Press button "TOGGLE"

What is expected?

Text "toggled" should disappear.

What is actually happening?

Text "toggled" does not disappear.


I found this problem in a more complex constellation with vue-router, where the optional component does not disappear:

<router-view name="document" v-slot="{ Component }">
  <transition name="tri-view-document" mode="in-out">
    <component v-if="activeDocument" :is="Component" :key="activeDocument.id"/>
  </transition>
</router-view>
@HcySunYang
Copy link
Member

When toggling branches with in-out mode, the branch being entered maybe a comment node, which makes the transition invalid and never completes. this PR checks the type of node being entered.

yyx990803 pushed a commit that referenced this issue Mar 22, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: transition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants