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

Issue with webcomponents that have HTML Comment elements #337

Open
spion opened this issue Aug 6, 2024 · 1 comment
Open

Issue with webcomponents that have HTML Comment elements #337

spion opened this issue Aug 6, 2024 · 1 comment

Comments

@spion
Copy link

spion commented Aug 6, 2024

Some webcomponents (like Ionic's ion-label) generate additional comment children

For those, the code frragment

current = parent.firstChild.data = value;

is going to try and update the comment rather than the actual text content.

A repro that isn't very minimal: https://stackblitz.com/edit/github-pyx5ga?file=package.json,app%2Fclient.tsx,vite.config.js,index.html,app%2Fionic-css.ts

You will notice that <IonLabel /> generates empty comment elements, which in turn cause SolidJS to update them if the only child of the component is a string

@ryansolid
Copy link
Owner

Our system works by walking known nodes, I don't don't know if there is anything to be done here. I'm open to suggestions but if something changes the shape of the HTML from what the JSX outputs we aren't going to know where things are.

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

No branches or pull requests

2 participants