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

Hot reload causing template to drop class attribute #351

Open
Bananas-Are-Yellow opened this issue Jan 19, 2024 · 1 comment
Open

Hot reload causing template to drop class attribute #351

Bananas-Are-Yellow opened this issue Jan 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Bananas-Are-Yellow
Copy link

I have a template file that contains two templates:

<template id="Section">
    <p class="panel-heading is-size-7 p-1 is-radiusless">
        ${Title}
    </p>
</template>

<template id="NoteCard">
    <div class="note-card">
    ...

These templates are instantiated several times on the page.

The content is client-side generated. Initially, the page displays correctly but when I interact with the page to cause it to update, instances of the first template used have the class attribute missing. So, instead of this:

<p class="panel-heading is-size-7 p-1 is-radiusless">
    My Title
</p>

I get this:

<p>
    My Title
</p>

My code uses the Section template first, so this is the one that shows the problem. But if I copy the HTML and create a template from a plain string instead, then the NoteCard template is the one that has the problem and the class="note-card" attribute missing.

The problem only occurs if hot reloading is enabled. To disable hot reloading, I can build a Release configuration, or I can comment out the hot reloading code (AddHotReload, UseHotReload, and Program.withHotReload).

@Bananas-Are-Yellow
Copy link
Author

The problem started after I updated from .NET 7 to .NET 8 along with the following Bolero updates:

image

@Tarmil Tarmil added the bug Something isn't working label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants