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

[🐞] v2 Duplicate q:key Attributes on Sibling Component$ Instances Cause DOM Failures #7375

Open
devcaeg opened this issue Feb 24, 2025 · 3 comments
Labels
TYPE: bug Something isn't working VERSION: upcoming major WAITING FOR: user Further information is requested from the issue / pr opener

Comments

@devcaeg
Copy link

devcaeg commented Feb 24, 2025

Which component is affected?

Qwik Runtime

Describe the bug

When multiple non-conditionally rendered component$ instances are placed inside a

, each instance receives an identical q:key attribute in the rendered DOM. This duplication leads to various failures, such as buttons becoming unresponsive and hover effects not working.

Reproduction

Missing

Steps to reproduce

  • Create a
    container.
  • Render several component$ instances as children of the
    (without any conditional rendering).
  • Inspect the DOM to observe that all component$ instances have the same q:key attribute.
  • Interact with UI elements (e.g., click buttons or hover over elements) and notice that the interactions fail (this happens after the first interaction).

System Info

System:
    OS: macOS 15.3.1
    CPU: (8) arm64 Apple M2
    Memory: 469.25 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    bun: 1.2.3 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 133.0.6943.127
    Edge: 133.0.3065.82
    Safari: 18.3
 npmPackages:
    @qwik.dev/core: https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@da11736
    @qwik.dev/router: https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@da11736
    typescript: 5.7.3 => 5.7.3 
    vite: 6.1.1 => 6.1.1

Additional Information

No response

@devcaeg devcaeg added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Feb 24, 2025
@Varixo Varixo added VERSION: upcoming major and removed STATUS-1: needs triage New issue which needs to be triaged labels Feb 24, 2025
@JerryWu1234
Copy link
Contributor

#7049
@devcaeg is it same according to this PR ?

@JerryWu1234 JerryWu1234 self-assigned this Feb 25, 2025
@devcaeg
Copy link
Author

devcaeg commented Feb 25, 2025

@JerryWu1234

What I see in my project is that many elements have the same “q:key” I think this is a mistake, maybe I am wrong.

@JerryWu1234 JerryWu1234 removed their assignment Feb 26, 2025
@Varixo
Copy link
Member

Varixo commented Feb 27, 2025

@devcaeg this is normal behavior for the same components I think, so the problem should be somewhere else. Is it possible to add some reproduction?
I can't reproduce it
https://qwikdev-build-v2.qwik-8nx.pages.dev/playground/#f=Q0o0xubG2BKNDqL2xdMqgXjTObcA6EusSQeiAJhpgArgBmoYAF2BSFbwhko1UJ0eEJem1kJcDGlzIKraaojBcGXa2rV24HIH3jwB6oM2Z2o1adpoAroWVN04FhUlVmoYGmjqpWXm5Gioq2vqAZsBUONtQAGjb6cJ9Q1SMwt3vjG0RGoZkpJvUOJmNNfQItcAAA

@Varixo Varixo added the WAITING FOR: user Further information is requested from the issue / pr opener label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: bug Something isn't working VERSION: upcoming major WAITING FOR: user Further information is requested from the issue / pr opener
Projects
None yet
Development

No branches or pull requests

3 participants