Skip to content

TransitionGroup getBoundingClientRect is not a function #6745

Closed as not planned
@yurirnascimento

Description

@yurirnascimento

Vue version

3.2.31

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-srxkag?file=src%2Fcomponents%2FHelloWorld.vue

Steps to reproduce

In parent component I have

<TransitionGroup appear>
    <template v-for="item in list" :key="item.id">
      <Notification
        v-if="item.visible"
        :notification="item"
        @close="handleClose"
      />
    </template>
</TransitionGroup>

And if child component init with html comment

<template>
  <!-- COMMENT -->
  <div>
    {{ notification.title }} -
    <button type="button" @click="handleClose">Clickme</button>
  </div>
</template>

I get the "TypeError: child.el.getBoundingClientRect is not a function"

Work if I remove the HTML comment from first line in template.

What is expected?

Execute the transition correctly, with or without comment on the child element

What is actually happening?

TypeError: child.el.getBoundingClientRect is not a function

System Info

No response

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    has PRA pull request has already been submitted to solve the issuescope: transition

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions