MVCoconut / coconut.vdom

Coconut rendering through virtual-dom.
The Unlicense
19 stars 8 forks source link

When wrapped div is left out, rendering is wrong #16

Closed markknol closed 5 years ago

markknol commented 5 years ago

I am doodling with coconut vdom, but noticed a weird bug. Here is the full source. I have not taken time to track it down to smaller reproducible example.

Whats wrong:
In this example, If I remove <div class="leave-me-out"> (but keep its children) in this example, and click the tink_core button, the rendering is totally messed up.

I thought it was related to the <if> in relation to the wrapped div (because adding a wrapping div makes everything work) but it goes deeper; when I change <HtmlView content="${pageContent}"/> to <HtmlView content="${url}"/>, everything works. This maybe suggest something is wrong with @:loaded var pageContent (PageData) ??

There are probably better ways to set this thing up, but afaik I'm not doing super fancy stuff and thus should work with and without that wrapping <div class="leave-me-out">.

Here's the full code: https://github.com/markknol/coconut-readme-reader/blob/master/src/Main.hx
(Repo: https://github.com/markknol/coconut-readme-reader)

I am using

# @install: lix --silent download "gh://github.com/MVCoconut/coconut.vdom#99a5f04b9d6432ed0cfaaa513aeddec9bde7ce88" into coconut.vdom/0.6.2/github/99a5f04b9d6432ed0cfaaa513aeddec9bde7ce88
markknol commented 5 years ago

It seems it works with the gen4 branch which @kevinresol just helped me with. Feel free to close.

(https://github.com/markknol/coconut-readme-reader/tree/gen4)