Skip to content

Teleport bug on conditional rendering #14412

@niksy

Description

@niksy

Vue version

3.5.27

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-hyda13bq?file=src%2FAboutView.vue

Steps to reproduce

  • Open reproduction link
  • Click on "Go to About"
  • Observe console for error

What is expected?

There is no error for nextSibling traversal on conditional rendering inside teleport component. If conditional or v-for loop is removed, there is no error.

What is actually happening?

Page is unresponsive due to node traversal not being done properly

Image

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vue: ^3.5.27 => 3.5.27

Any additional comments?

I’ve already mentioned this issue in related PR, but now I’ve managed to create minimal reproduction. Worth to mention this happens with SSR rendering mode.

There is also another issue but I don’t know if it’s related to this one.

If you remove every DOM node and leave only text node, then go to one link then another, you also get unrelated error. Should I submit this as different issue or?

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.scope: teleport

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions