Skip to content

"refInFor" searches upwards of inline-template boundary #11248

Open
@mernst-github

Description

@mernst-github

Version

2.6.11

Reproduction link

https://jsfiddle.net/b71adnym/2/

Steps to reproduce

Nest a component with an inline-template that has a ref in a v-for.

What is expected?

component.$ref.ref should point to the respective element.

What is actually happening?

component.$ref.ref is a singleton array with the element reference.


checkInFor loops over the element ancestors up to the document root, so it believes that the ref is in a loop, but it actually isn't.
The check should stop at the component root.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions