Skip to content

<transition-group> and v-show triggers move transition on enter #7879

Open
@chrisvfritz

Description

@chrisvfritz

Version

2.5.16

Reproduction link

https://jsfiddle.net/chrisvfritz/845Lee66/

Steps to reproduce

  1. Open the fiddle
  2. Click the "Toggle" button
  3. Watch the move transition trigger on enter

What is expected?

Just like with v-if, move transitions should not be triggered on enter (note that it is already not triggered on leave).

What is actually happening?

I haven't checked in the source yet, but I'm guessing that since elements with display: none still technically have coordinates:

DOMRect { x: 0, y: 0, width: 0, height: 0, top: 0, right: 0, bottom: 0, left: 0 }

The move transition is triggered on enter. I'm not sure why it wouldn't also occur on leave though.


This may be connected to #5800. Also, special thanks to @rachelnabors for finding this bug!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions