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

Component disappears if there is a comment on the first line. #27

Open
mikeabrahamsen opened this issue May 17, 2021 · 0 comments
Open

Comments

@mikeabrahamsen
Copy link
Owner

Using the following HTML template will fail unexpectedly:

<!-- templates/meld/counter.html -->
<div>
    <button meld:click="subtract">-</button>
    <input type="text" meld:model="count" readonly></input>
    <button meld:click="add">+</button>
</div>

While removing the comment with the same code works:

<div>
    <button meld:click="subtract">-</button>
    <input type="text" meld:model="count" readonly></input>
    <button meld:click="add">+</button>
</div>

To ensure morphDOM picks up changes correctly, we need to ensure the template always has <div> as the first line and nothing else.

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

1 participant