Skip to content

Both move and leave triggered for removed transition-group item if transition-group has display: flex #8973

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

Closed
dweerd opened this issue Oct 20, 2018 · 7 comments
Labels

Comments

@dweerd
Copy link

dweerd commented Oct 20, 2018

Version

2.5.17

Reproduction link

https://jsfiddle.net/pcb17vq4/

Steps to reproduce

See Fiddle.

What is expected?

Only a 'leave' is triggered when removing any item from the list displayed with display: flex.

What is actually happening?

Both a 'leave' and a 'move' are triggered

@posva posva added the bug label Oct 21, 2018
@ericp3reira
Copy link

May I take this one?

@posva
Copy link
Member

posva commented Oct 29, 2018

Go ahead!

@ericp3reira
Copy link

ericp3reira commented Oct 29, 2018

Great! I'm working on it.

@jkzing
Copy link
Member

jkzing commented Nov 6, 2018

This should not be a bug, It's just the difference between display: inline-block + position: absolute and display: flex + position: absolute.

In OP's fiddle there is,

.list-complete-leave-active {
  transition: all 1s;
  position: absolute;
}

Which sets the element to position: absolute when animating.

See the difference when position: absolute is added on element '4':

image

Try it in this fiddle: https://jsfiddle.net/pcb17vq4/1/

@Justineo
Copy link
Member

Justineo commented Nov 6, 2018

See @jkzing's fiddle above. Just remove position: absolute during transition and it will be working as expected.

@Justineo Justineo closed this as completed Nov 6, 2018
@ericp3reira
Copy link

Thanks, @jkzing! I found out that, but was trying to find a workaround.

@dweerd
Copy link
Author

dweerd commented Nov 6, 2018

Thanks for your efforts!

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

No branches or pull requests

5 participants