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

Breaks When Using <br/> #7

Closed
FlorianWendelborn opened this issue Feb 1, 2017 · 6 comments
Closed

Breaks When Using <br/> #7

FlorianWendelborn opened this issue Feb 1, 2017 · 6 comments
Labels
bug Something isn't working outdated Forgotten lore

Comments

@FlorianWendelborn
Copy link

FlorianWendelborn commented Feb 1, 2017

I tried to modify the counter example. When inserting a line-break <br/> it broke. 🙁

Console

InvalidCharacterError (DOM Exception 5): The string contains invalid characters.

Minimal Repro

app({
    view: () => html`<div>a<br/>b</div>`
})

Meta

Corresponding issue on hyperx's repo.
Related to choojs/hyperx#34.


Note that I do realize that <br> works. <br/> is more explicit though and as a React-user I'd like to keep this pattern.

@jorgebucaran
Copy link
Owner

jorgebucaran commented Feb 1, 2017

@dodekeract This seems to be an issue with Hyperx.

The solution is to append a space after the tag's name.

app({
    view: () => html`<div>a<br />b</div>`
})

Same applies to other self-closing tags.

EDIT: <br/> attempts to create an element with the name br/, so alternatively, we could patch this inside HyperApp's h. Not very nice, but I'll keep it in mind.

@FlorianWendelborn
Copy link
Author

@jbucaran So should I open the upstream issue or will we fix it here?

@jorgebucaran
Copy link
Owner

jorgebucaran commented Feb 1, 2017

@dodekeract The right thing to do, for now, is to open an issue there: https://github.com/substack/hyperx/issues/new

EDIT: Found this, possibly related? choojs/hyperx#34

@jorgebucaran jorgebucaran added the bug Something isn't working label Feb 1, 2017
@jorgebucaran
Copy link
Owner

@dodekeract Do you think we can close?

@FlorianWendelborn
Copy link
Author

FlorianWendelborn commented Feb 5, 2017

@jorgebucaran has this been fixed or is it confirmed to be only related to hyperx? If the answer is yes then feel free to close. 😉

@jorgebucaran
Copy link
Owner

jorgebucaran commented Feb 5, 2017

@dodekeract Confirmed this is a hyperx bug: choojs/hyperx#34.

@jorgebucaran jorgebucaran added the outdated Forgotten lore label Aug 31, 2018
Repository owner locked and limited conversation to collaborators Aug 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated Forgotten lore
Projects
None yet
Development

No branches or pull requests

2 participants