Closed genki closed 4 months ago
Sorry the reproduction url was wrong. Fixed.
If you use the "id" attribute instead of the "class", the result is to be expected behaviour. Here's an example. https://stackblitz.com/edit/qwik-starter-vnvcex?file=src%2Froutes%2Fhome%2Findex.tsx Please check out the "id" is not "top" but now "home".
This means the priority of the attribute is not consistent and depending on its kind.
let me try it
I think it's right if ID
but class
is indeed a problem. I will fix it
@JerryWu1234 Thanks!
@genki @JerryWu1234 this seems to have been fixed in 1.7.1. So I'm closing for now. Please feel free to ping me to re-open if I'm wrong.
@genki @JerryWu1234 this seems to have been fixed in 1.7.1. So I'm closing for now. Please feel free to ping me to re-open if I'm wrong.
Could you give me how you do it?
I knew that problem is Optimizer
rust part of.
I just curious how you fix it.
I'm not sure if it's fixed in 1.7.1 but it should be fixed in 2.0
Which component is affected?
Qwik Runtime
Describe the bug
I am writing components that the class attribute would be specified from manywhere. This is a simple example.
There is a component that accept the class attribute, and setting another class by itself. In this case, I expected the class of the
<div>
element to betop home
orhome
. But the real, the class attribute became totop
. Is this the expected behaviour?While digging the specification, I find the
setClasslist
function at https://github.com/QwikDev/qwik/blob/281de9701ecae0affcf18447985646917a2ef373/packages/qwik/src/core/render/dom/operations.ts#L129 but it is not referenced from anywhere.Reproduction
https://stackblitz.com/edit/qwik-starter-gbb6ic?file=src%2Froutes%2Findex.tsx
Steps to reproduce
Please visit the link above and open the dev tools then check the class attribute of the
Home
component.System Info
Additional Information
No response