You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I stumbled upon this problem with @qwikest/icons, but it seems to be affecting SVG nodes in general.
My app wants to render some icons into named slots.
When the page renders for the first time, all icons are properly rendered into their designated slots. Once the page re-renders on the client side, the icons are all rendered in the default slot.
The reproduction repository contains a simple Qwik app. The app has a <Repro> component with a named slot "red" and a default slot. The root page instantiates the <Repro> component and adds an SVG icon from qwikest/icons, a text, and a simple SVG with a circle to each slot.
After the initial render pass, all contents are rendered in the right slots.
A timeout forces the page to re-render on the client side by adding a .hasTimeout CSS class after a short delay. After the re-render, the named slot still shows the text that has q:slot="red", but the SVG icon and the circle with q:slot="red" are now rendered in the default (green) slot, together with the other (green) content.
Which component is affected?
Qwik Runtime
Describe the bug
I stumbled upon this problem with @qwikest/icons, but it seems to be affecting SVG nodes in general.
My app wants to render some icons into named slots.
When the page renders for the first time, all icons are properly rendered into their designated slots. Once the page re-renders on the client side, the icons are all rendered in the default slot.
Reproduction
https://github.com/rondonjon/qwik-repro-svg-icon-slots
Steps to reproduce
The reproduction repository contains a simple Qwik app. The app has a
<Repro>
component with a named slot"red"
and adefault
slot. The root page instantiates the<Repro>
component and adds an SVG icon from qwikest/icons, a text, and a simple SVG with a circle to each slot.After the initial render pass, all contents are rendered in the right slots.
A timeout forces the page to re-render on the client side by adding a
.hasTimeout
CSS class after a short delay. After the re-render, the named slot still shows the text that hasq:slot="red"
, but the SVG icon and the circle withq:slot="red"
are now rendered in the default (green) slot, together with the other (green) content.System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: