Skip to content

HTML comment breaks automatic attribute inheritance #5203

@vincerubinetti

Description

@vincerubinetti

Version

3.2.26

Reproduction link

sfc.vuejs.org/

Steps to reproduce

See the minimal reproduction. As is, the class="red" attribute is not passed down to the component. Try removing "comment B" from the component, and it will work. Or, if you move it underneath/within the v-else, it will also work.

What is expected?

HTML comments in the template should have no affect on the underlying styles, behavior, CSS, JS, Vue, or anything.

What is actually happening?

An HTML comment, combined with v-if, is confusing vue's ability to automatically inherit attributes.

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