Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scoped styles on a recursive component creates duplicate data-v- attribute #12159

Open
Ingramz opened this issue Oct 12, 2024 · 0 comments · May be fixed by #12175
Open

Scoped styles on a recursive component creates duplicate data-v- attribute #12159

Ingramz opened this issue Oct 12, 2024 · 0 comments · May be fixed by #12175

Comments

@Ingramz
Copy link

Ingramz commented Oct 12, 2024

Vue version

3.5.12

Link to minimal reproduction

https://stackblitz.com/edit/github-ippbyu

Steps to reproduce

Use link in reproduction. After starting, check the view-source of resulting HTML that is generated on server side.

This is mainly the same example as in #12136 , with following differences:

  • Content does not include void elements.
  • ContentNode contains <style scoped> to demonstrate the issue.
  • Stackblitz is used instead of playground to get a proper SSR output.

What is expected?

Unique v-data- attributes per element without duplicates.

What is actually happening?

  <div id="app"><div class="content"><!--[--><p data-v-65f4baf5><!--[--><a href="https://vuejs.org/" data-v-65f4baf5 data-v-65f4baf5><!--[--><strong data-v-65f4baf5 data-v-65f4baf5><!--[--><!--[-->Vue.js<!--]--><!--]--></strong><!--]--></a><!--]--></p><!--]--></div></div>

Notice how data-v-65f4baf5 appears twice on same element for <a> and <strong>.

System Info

No response

Any additional comments?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants