hybridsjs / hybrids

Extraordinary JavaScript UI framework with unique declarative and functional architecture
https://hybrids.js.org
MIT License
3.05k stars 85 forks source link

`class` attribute changes rendering in v8.1.7 #201

Closed Hyzual closed 1 year ago

Hyzual commented 1 year ago

Hello,

I was about to update to v8.1.7 but when testing I've found an issue in the HTML rendering. It seems the class attribute changes the HTML output when it is present.

I have set up a reproduction here: https://codesandbox.io/s/hybrids-class-attribute-changes-rendering-nzjkh3 In src/index.ts, if you remove the class attribute on the <tbody>, the <tr> elements should be children of <tbody> (as expected). With the class attribute present, they are instead children of the custom element itself (siblings of <table>).

v8.0.10 is not affected, if you need a starting point for git bisect.

Let me know if I can help further. Have a nice day !

smalluban commented 1 year ago

Thanks for rising this up! I will try to check it out as soon as possible.

smalluban commented 1 year ago

I've introduced a bug when refactoring the template engine compilation process in v8.1.6. The above commit should fix the issue. When tests pass on main branch, I will release a new patch.

Hyzual commented 1 year ago

I've just tried pulling the commit above, it fixes all the issues I've run into. Thanks a lot for the insanely fast bug fix 🙇💪

smalluban commented 1 year ago

The v8.1.8 has been released. Please, re-open the issue, if the problem still exists.