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

leave-to class is not removed when transition ends when using v-show and being immediately canceled #4462

Closed
tangjinzhou opened this issue Aug 27, 2021 · 5 comments
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working 🔩 p2-edge-case scope: transition

Comments

@tangjinzhou
Copy link
Contributor

tangjinzhou commented Aug 27, 2021

Version

3.2.6

Reproduction link

sfc.vuejs.org/

Steps to reproduce

1、use v-show

2、dynamic set show true/false

3、when leaveCancel hook called. leave-to class cannot remove

What is expected?

The element should cancel the animation and stay visible

What is actually happening?

The element disappears and stays hidden

@posva posva added 🐞 bug Something isn't working ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. scope: transition labels Aug 27, 2021
@posva posva changed the title transition leave-to class not remove leave-to class is not removed when transition ends when using v-show Aug 27, 2021
@posva posva changed the title leave-to class is not removed when transition ends when using v-show leave-to class is not removed when transition ends when using v-show and being immediately canceled Aug 27, 2021
@posva posva added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. has workaround A workaround has been found to avoid the problem and removed ❗ p4-important Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf. labels Aug 27, 2021
@posva
Copy link
Member

posva commented Aug 27, 2021

How does this happen in a real scenario? Setting the show to false right after exactly one tick of setting it to true seems quite strange.

Using more than a tick to set the value properly cancels the animation

@posva posva changed the title leave-to class is not removed when transition ends when using v-show and being immediately canceled Element is hidden when transition ends when using v-show and being immediately canceled Aug 27, 2021
@posva posva changed the title Element is hidden when transition ends when using v-show and being immediately canceled leave-to class is not removed when transition ends when using v-show and being immediately canceled Aug 27, 2021
@tangjinzhou
Copy link
Contributor Author

https://2x.antdv.com/components/slider/#components-slider-demo-basic
image
like this. we have a tooltip when click slider bar. when i click other point, tootip will hide, then show again.

@dsonet
Copy link
Contributor

dsonet commented Aug 29, 2021

https://2x.antdv.com/components/slider/#components-slider-demo-basic
image
like this. we have a tooltip when click slider bar. when i click other point, tootip will hide, then show again.

Which the tooltip should not hide when you keep clicking /moving on other points.

@tangjinzhou
Copy link
Contributor Author

Which the tooltip should not hide when you keep clicking /moving on other points.

@dsonet

It doesn’t matter, whether it’s hidden or not, it’s reasonable. I’m just giving a scenario

@dsine-de
Copy link

I have the same problem where the mutation of the property that is being used for the visibility state happens through a WebSocket message.

@yyx990803 yyx990803 added 🔩 p2-edge-case and removed 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels May 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working 🔩 p2-edge-case scope: transition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants